Camera having learning function

ABSTRACT

A camera according to the present invention comprises a taking lens whose focal length is variable. A focal length thereof is determined based on a subject distance measured by a distance measuring circuit and a relation between a subject distance and a focal length previously stored in a memory or according to a manual operation. The relation stored in the memory is changed based on a focal length determined.

This application is a divisional of application Ser. No. 07/797,960,filed Nov. 26, 1991, now U.S. Pat. No. 5,285,231.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a camera where a taking condition isautomatically set.

2. Description of the Prior Art

A large number of cameras have conventionally been proposed where ataking condition is automatically set based on a predetermined data.

However, when a taking condition automatically set by the camera doesnot suite a user's intention, the user has to manually re-set it.Furthermore, since a user's intention does not change so frequently, theuser has to reset the taking condition every time it is automaticallyset.

As described above, when taking condition automatically set by thecamera does not suite a user's intention, an advantage to be expectedfrom the automatization cannot be obtained.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a camera where a takingcondition which suites a user's intention is automatically set byautomatically changing a data for automatic setting according to a valuemanually set by the user ( which is called learning).

According to one feature of the present invention, a camera comprises: ataking lens whose focal length is variable; storing means where a datarepresenting a relation between a subject distance and a focal length ispreviously stored; distance measuring means for measuring a subjectdistance; automatic zooming means for determining a focal length of saidtaking lens based on a subject distance measured by said distancemeasuring means and the data stored in said storing means; manualzooming means for determining a focal length of said taking lensaccording to a manual operation; and changing means for changing acontent of the data stored by said storing means based on a focal lengthdetermined by said manual zooming means and a subject distance measuredby said distance measuring means.

According to another feature of the present invention, a cameracomprises: storing means where a data showing a

image is size of a subject image against a taking plane previouslystored; distance measuring means for measuring a subject distance;automatic setting means for determining a size of a subject imageagainst a taking image plane based on a subject distance measured bysaid distance measuring means and the data stored in said storing means;manual setting means for determining a size of a subject image against ataking image plane according to a manual operation; and changing meansfor changing a content of the data stored in said storing means based ona size of a subject image against a taking image plane determined bysaid manual setting means.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; changing means forchanging the automatic control data stored in said storing meansaccording to said manual control value; and change inhibiting means forinhibiting an operation of said changing means when said manual controlvalue does not fulfill a predetermined condition.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; changing means forchanging the automatic control data stored in said storing meansaccording to said manual control value based on one of pluralalgorithms; and selecting means for selecting an algorithm among saidplural algorithms.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; changing means forchanging the automatic control data stored in said storing means,according to said manual control value, in response to an exposurecontrol operation; mode selecting means for selecting a mode between asingle-frame advance mode where an exposure control operation isperformed only once and a continuous advance mode where an exposurecontrol operation is repeated; and control means for causing saidchanging means to operate only once while an exposure control operationis being repeated in said continuous advance mode.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; detecting meansfor detecting whether a taking image plane is longer in a verticaldirection or in a horizontal direction; and changing means for changingthe automatic control data stored in said storing means according to adetection result of said detecting means and said manual control value.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; changing means forchanging the automatic control data stored in said storing meansaccording to the automatic control data stored in said storing means andsaid manual control value; and reset means for changing said automaticcontrol data to a predetermined initial data.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; changing means forchanging the automatic control data stored in said storing meansaccording to a plurality of said manual control values determined by aplurality of preceding manual settings; and reset means for changingsaid automatic control data to a predetermined initial data.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; determining meansfor determining whether or not a changing operation can be performedwhere the automatic control data stored in said storing means is changedaccording to said manual control value; and selecting means forselecting between a mode where said changing operation is performed anda mode where said changing operation is not performed when saiddetermining means determines that said changing operation can beperformed.

According to another feature of the present invention, a cameracomprises: storing means where an automatic control data is stored;automatic setting means for determining an automatic control value basedon said automatic control data; manual setting means for determining amanual control value according to a manual operation; changing means forchanging the automatic control data stored in said storing meansaccording to said manual control value; changing-over means for changingover between a first mode where an operation of said changing means isinhibited and a second mode where it is not inhibited; and control meansfor controlling said changing-over means so that a mode is forciblychanged over to said second mode in response to an attachment of abattery.

According to another feature of the present invention, a cameracomprises: a taking lens whose focal length is variable; storing meanswhere a plurality of relations between a subject distance and a focallength are previously stored; distance measuring means for measuring asubject distance; selecting means for selecting a relation among saidplurality of relations; automatic zooming means for determining a focallength of said taking lens based on a subject distance measured by saiddistance measuring means and the relation selected by said selectingmeans; exposure control value outputting means for outputting anexposure control value; and calculating means for calculating anaperture value and a shutter speed which correspond to said exposurecontrol value based on one of plural program lines showing acorrespondence relation between an exposure control value and acombination of an aperture value and a shutter speed, wherein saidselecting means is a means for selecting a program line among saidplural program lines.

BRIEF DESCRIPTION OF THE DRAWINGS

This and other objects and features of this invention will become clearfrom the following description taken in conjunction with the preferredembodiments with reference to the accompanied drawings in which:

FIG. 1 is a schematic block diagram of a camera system where the presentinvention is incorporated;

FIG. 2A shows a front appearance of a body of the camera system;

FIG. 2B is a rear appearance of the camera body;

FIG. 2C is an enlarged view of a grip portion of the camera body;

FIG. 2D shows an appearance of an interchangeable lens which is attachedto the camera body;

FIG. 3 is a circuit diagram of an in-body circuit incorporated in thecamera body;

FIG. 4 is a circuit diagram of an in-lens circuit incorporated in theinterchangeable lens;

FIG. 5 shows a flow chart of a routine RESET executed by an in-bodymicrocomputer μC1 of the camera system;

FIG. 6 shows a flow chart of a subroutine AF LENS MOVE-IN executed bythe in-body microcomputer μC1;

FIG. 7 shows a flow chart of a routine COUNTER INTERRUPT CI2 executed bythe in-body microcomputer μC1;

FIG. 8 shows a flow chart of a routine TIMER INTERRUPT TI2 executed bythe in-body microcomputer μC1;

FIG. 9 shows a flow chart of a subroutine STOP AF LENS executed by thein-body microcomputer μC1;

FIG. 10 shows a flow chart of a subroutine FINDER SENSING executed bythe in-body microcomputer μC1;

FIG. 11 shows a flow chart of a subroutine LENS COMMUNICATION LCM1executed by the in-body microcomputer μC1;

FIG. 12 shows a flow chart of a routine TIMER INTERRUPT TI1 executed bythe in-body microcomputer μC1;

FIGS. 13A and 13B show a flow chart of a subroutine SlON executed by thein-body microcomputer μC1;

FIG. 14 shows a content of a display on a display port ion of the camerabody;

FIG. 15 shows a flow chart of a subroutine LENS COMMUNICATION LCM2executed by the in-body microcomputer μC1;

FIGS. 16 to 19 show flow charts of subroutines CARD COMMUNICATIONS CCM1to CARD COMMUNICATIONS CCM4, respectively, executed by the in-bodymicrocomputer μC1;

FIG. 20 shows a flow chart of a subroutine AF CONTROL executed by thein-body microcomputer μC1;

FIG. 21 shows a flow chart of a subroutine LENS DRIVE executed by thein-body microcomputer μC1;

FIG. 22 shows a flow chart of a subroutine EXPOSURE CONTROL executed bythe in-body microcomputer μC1;

FIG. 23 shows a flow chart of a subroutine CARD CONTROL executed by thein-body microcomputer μC1;

FIG. 24 shows a flow chart of a routine RESET executed by an in-lensmicrocomputer μC2 of the interchangeable lens;

FIG. 25 shows a flow chart of a routine CS INTERRUPT executed by thein-lens microcomputer μC2;

FIG. 26 shows a flow chart of a subroutine PZ executed by the in-lensmicrocomputer μC2;

FIG. 27 shows a flow chart of a routine RESET executed by an in-cardmicrocomputer μC3 of Sports Card which is attached to the camera body;

FIG. 28 shows a flow chart of a routine INTERRUPT executed by thein-card microcomputer μC3 of Sports Card;

FIG. 29 shows a flow chart of a subroutine DATA SETTING executed by thein-card microcomputer μC3 of Sports Card;

FIGS. 30A and 30B show a flow chart of a subroutine AE CALCULATIONexecuted by the in-card microcomputer μC3 of Sports Card;

FIG. 31 shows an example of an AE program line of Sports Card;

FIG. 32 shows a flow chart of a subroutine LEARNING executed by thein-card microcomputer μC3 of Sports Card;

FIG. 33 shows a flow chart of a subroutine LR executed by the in-cardmicrocomputer μC3 of Sports Card;

FIG.34 shows a zoom program line of Sports Card;

FIG. 35 shows a flow chart of a routine RESET executed by the in-cardmicrocomputer μC3 of Auto Depth Card which is attached to the camerabody;

FIG. 36 shows a flow chart of a routine INTERRUPT executed by thein-card microcomputer μC3 of Auto Depth Card;

FIG. 37 shows a flow chart of a subroutine DATA SETTING executed by thein-card microcomputer μC3 of Auto Depth Card;

FIG. 38 shows a flow chart of a subroutine LR executed by the in-cardmicrocomputer μC3 of Auto Depth Card;

FIG. 39 shows a flow chart of a subroutine LEARNING executed by thein-card microcomputer μC3 of Auto Depth Card;

FIG. 40 shows a manner in which learning is performed by Auto Depth Cardand Portrait Card;

FIGS. 41A, 41B and 41C show a flow chart of a subroutine AE CALCULATIONexecuted by the in-card microcomputer μC3 of Auto Depth Card;

FIG. 42 shows an AE program line of Auto Depth Card;

FIG. 43 is an explanatory view of an AF lens drive control for taking apicture, with Auto Depth Card, where both a main object and thebackground are in focus;

FIG. 44 shows a zoom program line of Auto Depth Card;

FIG. 45 shows a flow chart of a routine RESET executed by the in-cardmicrocomputer μC3 of Portrait Card which is attached to the camera body;

FIG. 46 shows a flow chart of a routine INTERRUPT executed by thein-card microcomputer μC3 of Portrait Card;

FIG. 47 shows a flow chart of a subroutine DATA SETTING executed by thein-card microcomputer μC3 of Portrait Card;

FIG. 48 shows a flow chart of a subroutine LR executed by the in-cardmicrocomputer μC3 of Portrait Card;

FIG. 49 shows a flow chart of a subroutine LEARNING executed by thein-card microcomputer C3 of Portrait Card;

FIGS. 50A, 50B and 50C show flow chart of a subroutine AE CALCULATIONexecuted by the in-card microcomputer μC3 of Portrait Card;

FIG. 51 shows a zoom program line of Portrait Card; and

FIG. 52 shows a program lines, of Portrait Card, for providing arelation between a magnification and an aperture value.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

As an embodiment of the present invention, a single-lens reflex camerasystem will hereinafter be described which has an interchangeable lenswhere a focal length can be changed by moving a lens through a motor.

FIG. 1 is a schematic block diagram of the camera system. As shown inthe figure, the camera body has a function to automatically perform afocusing operation by inputting data from a distance measuring portion 2into a body controlling portion 1 to calculate a lens movement amountand by moving a focusing lens unit L_(F) (hereinafter referred to as AFlens) by activating a motor M1 with a focusing lens unit drivecontrolling portion 3, and a function to make the lens operate undercontrol of the camera body by communicating with the lens through a bodydata outputting portion 4 and a lens data inputting portion 5. When anIC card is attached to the camera body, the body controlling portion 1As provided with a function of the IC card. Various kinds of IC cardscorresponding to various photographing genres such as "Sports Card","Portrait Card", etc. are available. When an IC card is attached to thecamera body, the body controlling portion 1 communicates with the cardthrough a body data outputting portion 31 and a card data inputtingportion 32. The card controlling portion 35 communicates with the camerabody through a body data inputting portion 33 and a card data outputtingportion 34, and calculates an aperture value, a shutter speed and afocal length of a zoom lens that are suitable for the photographinggenre allocated to the IC card and transmits them to the camera body. Asa result, the body controlling portion i can control the camera system,by using the control information, so that a photographing is performedunder a condition suitable for each photographing genre.

On the other hand, the lens has a function to move a zoom lens unitL_(A) to perform a zooming operation by activating a motor M3(hereinafter referred to as "power zoom") with a zoom lens unitcontrolling portion 7 when an operation of a zooming ring is detected bya zooming ring operation detecting means 10, a function to output dataof the lens to the camera body by communicating with the camera bodythrough a body data inputting portion 8 and a lens data outputtingportion 9, and a function to make the lens operate according to datafrom the camera body.

Next, appearances of the camera body and lens will be described.

FIG. 2A shows a front appearance of a camera body BD to which thepresent invention is applied. FIG. 2B shows a rear appearance of thecamera body BD. FIG. 2C is an enlarged view of a grip portion of thecamera body BD. FIG. 2D is an appearance of an interchangeable lens LEwhich is interchangeably attached to the camera body BD.

The name and function of each portion of the camera body BD will bedescribed with reference to FIGS. 2A to 2D.

The numeral 11 is a slider for turning on/off a main switch S_(M). Thecamera body BD is under an operable condition when the slider 11 isplaced at its ON position. The camera body is under an inoperablecondition when the slider 11 is placed at its OFF position.

The numeral 12 is a release button. When the release button is depressedhalfway, a preparation switch S1 (to be described later with referenceto FIG. 3) is turned on to start a photometry, exposure calculation andauto focusing (AF) operations, When the release button 12 is depressedall the way down, a release switch S2 (to be described later withreference to FIG. 3) is turned on to start an exposure controloperation.

The numeral 13 is an inserting portion for IC cards. When an IC card inwhich a microcomputer is incorporated is inserted into the insertingportion 13, the camera body BD is provided with the function of the ICcard.

The numeral 14 is a body display portion, where a shutter speed, anaperture value, information on an IC card, etc. are displayed.

The numeral 15 is a mount lock pin. When the interchangeable lens LE isattached to the camera body BD and is mount locked, a lens attachmentswitch S_(LE) (to be described later with reference to FIG. 4) is OFF.Otherwise, the lens attachment switch S_(LE) is ON.

The numeral 16 is an AF coupler, which is rotated in accordance with arotation of an AF motor provided in the camera body BD.

The numeral 17 is a stop-down lever for closing an aperture of theinterchangeable lens LE by stop-down steps obtained by the camera bodyBD.

The numeral 18 is a card key for switching between an ON and OFF of afunction of an IC card.

The numeral 19 is a learning mode key for switching between an ON, OFFand resetting of a learning mode (to be described later).

The numeral 20 is an LED (light-emitting diode) which is a lightemitting portion. The numeral 21 is an SPC (silicon photocell) which isa light receiving portion. The SPC 21 in corporation with the LED 20senses whether or not the user is looking into a finder (this sensing ishereinafter referred to as finder sensing).

The numeral 24 is a slider for changing over a mode between asingle-frame advance mode and a continuous advance mode. Thesingle-frame advance mode is set when the slider 24 is placed at Sposition, and the continuous advance mode is set when the slider 24 isplaced at C position. The single-frame advance mode is a normal modewhere a photographing operation is performed only once when the releasebutton 12 is depressed all the way down. The continuous mode is a modewhere a photographing operation is continuously performed at apredetermined film winding speed while the release button 12 is beingdepressed all the way down.

An exterior 23 of the grip portion shown in FIG. 2C is made of elasticrubber. Conductive patterns 22a and 22b insulated against each other areprovided inside the grip portion. Conductive rubber (not shown) isarranged between the above-mentioned rubber and the conductive patterns22a and 22b. The conductive patterns 22a and 22b are electricallyconnected through the conductive rubber by gripping the exterior 23 ofthe grip portion, whereby the grip portion functions as a switch(hereinafter referred to as grip switch).

Next, the name and function of each portion of the interchangeable lensLE will be described.

The numeral 25 is a mount lock slot. The numeral 26 is an AF coupler.The numeral 27 is a stop-down lever. When the interchangeable lens LE isattached to the camera body BD, the mount lock pin 15 of the camera bodyBD is engaged with the mount lock slot 25 of the interchangeable lens LEand a convex portion of the AF coupler 16 of the camera body BD engageswith a concave portion of the AF coupler 26 of the interchangeable lensLE, so that a rotation of the AF motor of the camera body BD istransmitted to the interchangeable lens LE through the AF couplers 16and 26 to move the AF lens for focusing. Further, terminals J₁ to J₈ ofthe interchangeable lens LE are connected to terminals J₁₁ to J₁₈ of thecamera body. Moreover, the stop-down lever 17 of the camera body BDengages with the stop-down lever 27 of the interchangeable lens LE, sothat the stop-down lever 27 of the interchangeable lens LE moves,following the stop-down 1ever 17 of the camera body BD, by a movementamount of the stop-down lever 17 of the camera body BD to control anaperture value so as to be a value corresponding to the movement amountof the stop-down levers 17 and 27.

The numeral 80 is a zooming ring, which is rotated to specify adirection and speed for power zooming. By rotating the zooming ring 80,the M3 provided in zoom motor the interchangeable lens LE is activatedto change a focal length in the telephoto or the wide-angle direction.

Next, a circuit arrangement of the camera system will be described.

FIG. 3 is a circuit diagram of an in-body circuit incorporated in thecamera body BD. Firstly, the in-body circuit will be described withreference to the figure.

μC1 is an in-body microcomputer μC1 for controlling the camera variousentire system and for performing calculations.

AF_(CT) is a focus detection light receiving circuit, which is providedwith a CCD (charge coupled device) which serves as an accumulation-typefocusing optical sensor for accumulating optical charge for apredetermined period of time, a drive circuit for the CCD and a circuitfor processing and A/D (analog to digital)-converting an output of theCCD and providing it (data dump) to the in-body microcomputer μC1. Thefocus detection light receiving circuit AF_(CT) is connected to thein-body microcomputer μC1 through a data bus. Information on a defocusamount of a subject located in a distance measurement area is obtainedby the focus detection light receiving circuit AF_(CT).

LM is a photometry circuit provided on an optical path of the finder.The photometry value is A/D-converted and supplied to the in-bodymicrocomputer μC1 as luminance information.

DX is a film sensitivity reading circuit, provided in a film holder, forreading data on a film sensitivity and for serially outputting them tothe in-body microcomputer μC1.

DISPC is a display circuit for inputting display data and a displaycontrol signal from the in-body microcomputer μC1 to make a displayportion DISP (the display portion 14 shown in FIGS. 2A and 2B) providedon the upper surface of the camera body BD display predetermined data.

CD is an IC card to be inserted into the card inserting portion 13. Amicrocomputer (hereinafter referred to as in-card microcomputer μC3) isincorporated in the IC card. The IC card CD will be described later indetail.

EPD is a finder sensing circuit for sensing that the photographer islooking into the finder.

LE_(CT) is an in-lens circuit incorporated in the interchangeable lensLE (hereinafter referred to as lens) for providing informationparticular to the lens LE to the in-body microcomputer μC1. The in-lenscircuit will be described later in detail.

M1 is an AF motor for driving the AF lens of the lens LE through the AFcouplers 16 and 26.

MD1 is a motor drive circuit for driving the AF motor M1 based on thefocus detection information. Its rotation direction and stopping arecontrolled by a command of the in-body microcomputer μC1.

ENC is an encoder for monitoring a rotation of the AF motor M1. Theencoder ENC outputs pulses into a counter input terminal CNT of thein-body microcomputer μC1 every predetermined angle of rotation. Thein-body microcomputer μC1 counts the pulses, detects a movement amountof the AF lens from the infinity position to the present position, andcalculates an object distance (subject distance) of a subject based onthe detected movement amount (movement pulse count CT).

TV_(CT) is a shutter controlling circuit for controlling a shutter basedon a control signal from the in-body microcomputer μC1.

AV_(CT) is an aperture controlling circuit for controlling an aperturebased on a control signal from the in-body microcomputer μC1.

M2 is a motor for winding up and rewinding film and for charging anexposure controlling mechanism. MD2 is a motor drive circuit for drivingthe motor M2 based on a command of the in-body microcomputer μC1.

Next, portions relating to power source will be described.

E1 is a battery which supplies power to the camera body BD.

Tr1 is a first power-supply transistor for supplying power to some ofthe above-described circuits. Tr2 is a second power-supply transistorfor supplying power for driving the zoom motor M3 of the lens LE. Thepower-supply transistor Tr2 is of MOS (metal oxide semiconductor)structure.

DD is a DC/DC (direct current to direct current) converter forstabilizing a voltage V_(DD) to be supplied to the in-body microcomputerμC1. The DC/DC converter DD operates when the level of a powercontrolling terminal PWO is high. The voltage V_(DD) is an operationpower voltage for the in-body microcomputer μC1, the in-lens circuitLE_(CT), the in-card microcomputer μC3, the film sensitivity readingcircuit DX and the display controlling circuit DISPC. A voltage V_(CC1)is an operation power voltage for the focus detection light receivingcircuit AF_(CT) and the photometry circuit LM, and is supplied from thebattery E1 through the power-supply transistor Tr1 under control of asignal outputted from a power controlling terminal PW1. A voltageV_(CC2) is an operation power voltage for the zoom motor M3 of the lensLE, and is supplied from the battery E1 through the power-supplytransistor Tr2 under control of a signal outputted from a powercontrolling terminal PW2. A voltage V_(CC0) is an operation powervoltage for the finder sensing circuit EPD, the motor drive circuit MD1,the shutter controlling circuit TV_(CT), the aperture controllingcircuit AV_(CT) and the motor drive circuit MD2, and is supplieddirectly from the battery E1.

D1 to D3 are diodes for supplying a voltage lower than the voltageV_(DD) to the in-body microcomputer μC1 in order to reduce powerconsumption while the DC/DC converter DD is being stopped. This lowvoltage is set to a lowest power voltage at which the in-bodymicrocomputer μC1 can operate. Only the in-body microcomputer μC1 isoperable while the DC/DC converter DD is being stopped.

GND1 is a ground line for a smaller-power-consumption portion. Theground line is connected through the terminals J₁₇ and J₇ between thelens LE and camera body BD. Although different ground lines are requiredfor an analog portion and a digital portion of the camera body BD, theground line GND1 is shown by a single line in the figures for easierexplanation.

GND2 is a ground line for a Earlier-power-consumption portion. The GND2is connected through the terminals and J₈ between the lens LE and thecamera body BD.

Next, switches will be described.

S_(CD) is a normally-open push switch for switching between an ON andOFF of a function of the IC card CD when the IC card CD is attached tothe camera body BD. The switch S_(CD) is turned on when the card key 18is depressed.

S_(GR) is a grip switch which is turned on when the grip portion isgripped.

S1 is a preparation switch which is turned on when the release button 12is depressed halfway. When the switch or the above-described grip switchS_(GR) is turned on, an interrupt signal is inputted into an interruptterminal INT1 of the in-body microcomputer μC1 to start operationsrequired for photographing such as a photometry, a distance measurement,an AF (automatic focusing) operation, etc.

S_(M) is a main switch which is turned on when the slider 11 for makingthe camera operable is at the ON position and is turned off when theslider 11 is at the OFF position.

PG1 is a pulse generator for outputting a pulse whose level is low everytime the switch S_(M) is turned from on to off or from off to on. Theoutput of the pulse generator PG1 is inputted into an interrupt terminalINT2 of the in-body microcomputer C1 as an interrupt signal.

S2 is a release switch which is turned on when the release button 12 isdepressed all the way down. When the switch S2 is turned on, aphotographing operation is performed.

S_(SC) is a switch for changing over a mode between the single-frameadvance mode and the continuous advance mode according to a position ofthe slider 24. When the switch S_(SC) is turned on (that is, the slider24 is placed at S position), the single-frame advance mode is set. Whenthe switch S_(SC) is turned off (that is, the slider 24 is placed at Cposition), the continuous advance mode is set.

S3 is a normally-open learning mode switch for switching between an ON,OFF and resetting of the learning mode.

S_(HL) is a switch for sensing whether the camera is held longitudinallyor horizontally. The switch S_(HL) is turned on when the camera ishorizontally held. It is turned off when the camera is longitudinallyheld.

S_(RE1) is a battery attachment detecting switch which is turned offwhen the battery E1 is attached to the camera body BD. When the batteryE1 is attached to the camera body BD and the battery attachment switchS_(RE1) is turned off, a condenser C1 is charged through a resistance R1to change the level of a reset terminal RE1 of the in-body microcomputerμC1 from low to high. Thereby, the in-body microcomputer μC1 executes aroutine RESET to be described later.

S_(RE3) is a card attachment detecting switch which is turned off whenthe IC card CD is attached. When the IC card CD is attached and theswitch S_(RE3) is turned off, the level of a reset terminal RE3 of thein-card microcomputer μC3 is changed from low to high to reset thein-card microcomputer μC3.

Next, portions relating to a serial data communication will bedescribed.

The photometry circuit LM, the film sensitivity reading circuit DX, thedisplay circuit DISPC and the in-card microcomputer μC3 perform a serialdata communication with the in-body microcomputer μC1 through signallines of a serial input SIN, a serial output SOUT and a serial clockSCK, respectively. The partner of the serial communication with thein-body microcomputer μC1 is selected by chipselect terminals CSLM,CSDX, CSDISP and CSCD. When the level of the terminal CSLM is low, thephotometry circuit LM is selected. When the level of the terminal CSDXis low, the film sensitivity reading circuit DX is selected. When thelevel of the terminal CSDISP is low, the display circuit DISPC isselected. When the level of the terminal CSCD is low, the in-cardmicrocomputer μC3 is selected. The three signal lines SIN, SOUT and SCKfor the serial communication are connected to the in-lens circuitLE_(CT) through the terminals J₁₅ and J₅ ; J₁₄ and J₄ ; and J₁₆ and J₆,respectively. When the in-lens circuit LE_(CT) is selected as thepartner of the communication, the level of a terminal CSLE is set tolow. The signal of the low level is transmitted to the in-lens circuitLE_(CT) through the terminals J.sub. 3 and J₁₃.

Next, the in-lens circuit LE_(CT) will be described with reference toFIG. 4.

FIG. 4 is a circuit diagram of the in-lens circuit LE_(CT) incorporatedin the interchangeable lens LE. In the figure, μC2 is an in-lensmicrocomputer μC2 having functions such as for controlling the zoommotor M3 provided in the interchangeable lens LE, for executing a datacommunication with the camera body BD and for setting a mode.

Now, the terminals J₁ and J₈ which are connected to the camera body BDwill be described. J₁ is a power terminal for supplying a power voltageV_(CC2) for driving the zoom motor M3 from the camera body BD to thelens LE. J₂ is a power terminal for supplying the voltage VDD for otherthan driving the zoom motor M3 from the camera body BD to the lens LE.J₃ is a terminal for inputting and outputting a signal representing arequest of the data communication. J₄ is a clock terminal for inputtinga clock for the data communication from the camera body BD. J₅ is aserial input terminal for inputting data from the camera body BD. J₆ isa serial output terminal for outputting data to the camera body BD. J₇is a ground terminal for the circuits other than the motor drivecircuits. J₈ is a ground terminal for the motor drive circuit.

RSIC is a reset IC for resetting the in-lens microcomputer μC2 when thevoltage VDD supplied from the camera body BD is lower than the normaloperation voltage of the in-lens microcomputer μC2. R2 and C2 are areset resistor and a reset condenser for resetting the in-lensmicrocomputer μC2.

RE2 is a reset terminal of the in-lens microcomputer μC2. When thevoltage V_(DD) for activating the in-lens circuit is supplied from thecamera body BD to the in-lens microcomputer μ2, and the level of theterminal RE is changed from low to high through the resistor R2 andcondenser C2, the in-lens microcomputer μC2 executes a reset operation.

ZVEN is a zoom speed encoder which interlocks with the zooming ring 80.The zoom speed encoder ZVEN sets a speed and direction for power zoomingin a power zooming operation.

ZMEN is a zoom encoder for showing an absolute position of the zoomingring 80.

M3 is a zoom motor for driving a zoom lens unit (zooming ring 80). Themovement of the zoom lens unit by the zoom motor M3 can change a focallength without changing a position of an image point.

MD3 is a motor drive circuit for driving the zoom motor M3. The motordrive circuit MD3 controls the rotation of the zoom motor M3 accordingto a control signal representing a motor drive direction and speedprovided from the in-lens microcomputer μC2. It also performs ashort-circuiting between both terminals of the zoom motor M3 and stopsapplying a voltage to the zoom motor M3 according to a motor stop signaland a motor halt signal provided form the in-lens microcomputer μC2.

D5 is a diode for preventing a reverse flow of a current. The diode D5prevents a reverse flow of a current from one electric power source tothe other electric power source as well as supplies to the motor drivecircuit MD3 the power voltage V_(CC2) for driving the zoom motor M3which is supplied from the camera body BD to the lens LE.

Next, switches will be described.

S_(LE) is a lens is attachment detecting switch which turned off whenthe interchangeable lens LE is attached to the camera body BD and ismount locked. When the interchangeable lens LE is detached from thecamera body BD, the switch S_(LE) is is turned on so that the condenserC2 short-circuited between both terminals. Thereby, the electric chargewhich is accumulated in the condenser C2 is discharged to change thelevel of the terminal RE2 of the in-lens microcomputer μC2 to low.Thereafter, when the interchangeable lens LE is attached to the camerabody BD, the switch S_(LE) is turned off so that the condenser C2 ischarged through the power line V_(DD). Then, after a period of timepredetermined by the resistor R2 and the condenser C2, the level of theterminal RE2 is changed to high so that the in-lens microcomputer μC2executes a reset operation as described above.

Finishing a description of the hardware of the present embodiment, thesoftware will hereinafter be described.

Firstly, the software of the in-body microcomputer μC1 will bedescribed.

When the battery E1 is attached to the camera body BD, in the in-bodycircuit shown in FIG. 3, the battery attachment detecting switch S_(RE1)is turned off, the reset condenser C1 is charged through the resistorR1, and thereby, a reset signal whose level changes from low to high isinputted to the reset terminal RE1 of the in-body microcomputer μC1which controls the entire camera system. In response to the input of thereset signal, the in-body microcomputer μC1 activates the DC/DCconverter DD as well as starts to generate a clock by use of theincorporated hardware. Then, supplied with the voltage VDD at which thein-body microcomputer μC1 is operable, the in-body microcomputer μC1executes a routine RESET shown in FIG. 5. Under a sleep condition (orhalt condition) to be described later, the clock generation by thein-body microcomputer μC1 and the operation of the DC/DC converter DDare stopped. When an interrupt is applied to the in-body microcomputerμC1 in this condition, the in-body microcomputer μC1 starts the clockgeneration and activates the DC/DC converter DD by means of the insidehardware provided in the in-body microcomputer μC1 in the same manner asthat when the battery E1 is attached.

In the routine RESET shown in FIG. 5, firstly, all the interrupts areinhibited and various ports and registers are reset (steps #5 to #10).Then, whether or not the main switch S_(M) is ON is determined at step#20. When the main switch S_(M) is turned from on to off or from off toon, an interrupt SMINT is also generated by an operation of the mainswitch S_(M) so that steps from #20 are executed. When it is determinedthat the main switch S_(M) is ON at step #20, all the interrupts arepermitted and the levels of the output ports PW1 and PW2 which are thepower control terminals are respectively changed to high in order toactivate the transistors Tr1 and Tr2 for supplying power to each circuitand the in-lens microcomputer μC2 (steps #25 to #35).

Next, a subroutine AF LENS MOVE-IN is executed at step #40. Thissubroutine is shown in FIG. 6. When the subroutine is called, firstly, asubroutine LENS COMMUNICATION LCM1 is executed at step #150.

The lens communication LCM1 is a communication in a communication modeCM1, which is one of various communications between the in-bodymicrocomputer μC1 and the in-lens microcomputer μC2, where data from thein-lens microcomputer μC2 to be described in this embodiment areinputted. The subroutine LENS COMMUNICATION LCM1 is shown in FIG. 11.When the subroutine is called, firstly, data showing that the presentcommunication mode is the communication mode CM1 are set, the level ofthe terminal CSLE is changed to low and the in-lens microcomputer μC2 isinformed that a data communication will be performed (steps #400 and#402). Then, a two-byte serial communication (serial input/output) isperformed at step #405. In the serial communication, the in-bodymicrocomputer μC1 and the in-lens microcomputer μC2 simultaneously andserially input data transmitted from the other while serially outputtingdata to the other. At the first byte, the data showing the kind of thecamera body BD are outputted from the in-body microcomputer μC1. At thistime, the in-lens microcomputer μC2 outputs meaningless data FF_(H) (thesubscript H shows a hexadecimal number), and the in-lens microcomputerμC2 and the in-body microcomputer μC1 respectively input datatransmitted from the other. At the second byte, data showing the kind ofthe lens LE are outputted from the in-lens microcomputer μC2. At thistime, meaningless data FF_(H) are outputted from the in-bodymicrocomputer μC1, and the in-lens microcomputer μC2 and the in-bodymicrocomputer μC1 respectively input data transmitted from the other.Then, the one-byte data showing the present communication mode areserially outputted to the in-lens microcomputer μC2 in order to showthat mode of the communication with the in-lens microcomputer μC2 is thecommunication mode (step #410). After the process waits for a while,13-byte data are inputted from the in-lens microcomputer μC2, the levelof the terminal CSLE is changed to high, and the process returns (steps#415 to #425). It is in order to inform the in-lens microcomputer μC2 ofthe completion of the subroutine LENS COMMUNICATION LCM1 that the levelof the terminal CSLE is changed to high before the process returns. Thesimilar process is applied in the lens communications of the othermodes.

Now, the detail of the data will be described which are transmittedbetween the in-body microcomputer μC1 and the in-lens microcomputer μC2in this embodiment.

In this embodiment, communication of the communication mode CM1 and thatof a communication mode CM2 are performed. These communications arecalled a lens communication LCM1 and a lens communication LCM2,respectively. In the lens communication LCM1, the in-lens microcomputerμC2 transmits data showing the following to the in-body microcomputerμC1 as data particular to the lens LE:

(i) an open aperture value AV_(o) ;

(ii) a maximum aperture value AV_(max) ;

(iii) a converting coefficient K_(L) for converting a defocus amountinto a drive amount (the converting coefficient K_(L) will hereinafterbe referred to as drive amount converting coefficient);

(iv) a present focal length f_(n) ;

(v) a lens attachment signal L_(ON) ;

(vi) a converting coefficient K_(N) for converting a movement amountinto a distance (the converting coefficient K_(N) will hereinafter bereferred to as distance converting coefficient);

(vii) a minimum focal length and f_(min) ; and

(viii) a maximum focal length f_(max).

Data showing a condition of the zoom switch (that is, whether or not thezooming ring has been operated) are also transmitted (the data willhereinafter be referred to as zoom switch data).

On the other hand, in the lens communication LCM2, the in-bodymicrocomputer μC1 transmits the data showing the following to thein-lens microcomputer μC2:

(ix) a target focal length f_(c) ; and

(x) an ON/OFF of an APZ, and whether or not a subroutine SlON isexecuted for the first time (for the first time in a repetition of thesubroutine SlON).

The above data (i) to (x) are inputted and outputted as one-byte data.

Returning to the flow chart shown in FIG. 6, the description will becontinued. When the process returns from the above-described subroutineLENS COMMUNICATION LCM1, the value of a counter N showing a drive amountof the AF lens for focusing is set to -N_(LG) (a negative value having alarge absolute value, and whether the first bit thereof is 0 or 1indicates whether the value is positive or negative), and a subroutineLENS DRIVE for the AF lens is executed (steps #152 and #155).

The subroutine LENS DRIVE is shown in FIG. 21. When the subroutine iscalled, whether or not the sign of the lens drive amount N is positive(that is, whether or not the first bit is 1) is determined (step #1197).When it is positive, the lens drive direction is set to a move-outdirection (step #1198), and when it is not positive, to a move-indirection (step #1199). Then, a signal representing the lens drivedirection is outputted to the motor drive circuit MD1, a flag LMVFshowing that the lens is being moved is set, and the process returns(step #1200).

In this embodiment, the driving of the AF lens is controlled by acounter interrupt CI2 and a timer interrupt TI2. The counter interruptCI2 is generated when a pulse showing the driving of the AF lens isinputted from the encoder ENC (see FIG. 3). The timer interrupt TI2 isgenerated when the next counter interrupt CI2 is not executed within afixed period of time after the first counter interrupt CI2 is executed.Then, it is detected by the timer interrupt TI2 that the lens hasreached the endmost position (the infinity position or the nearestposition). That is, when a value having a large absolute value is set asthe drive amount N as at step #152 of FIG. 6, the lens always reachesthe endmost position without stopping on the way, and it is detected bythe timer interrupt TI2 which is generated thereafter that the lens hasreached the endmost position.

Routines COUNTER INTERRUPT CI2 and TIMER INTERRUPT TI2 are shown inFIGS. 7 and 8, respectively, and will be described with reference to thefigures.

First, the routine COUNTER INTERRUPT will be described. The counterinterrupt is generated when the pulse is inputted from the encoder ENC,and the routine COUNTER INTERRUPT CI2 shown in FIG. 7 is executed.Firstly, 1 is subtracted from the counter value N showing a drive amountof the AF lens and the result is set to the new counter value N (step#250), and after being reset, a timer T1 for the timer interrupt isstarted (step #255). Then, whether or not the counter value N is 0 isdetermined (step #260). When N=0, determining that the lens has moved bya predetermined amount, a subroutine STOP AF LENS is executed, and theprocess returns (step #265). When N≠0, the process returns withoutstopping the AF lens.

Next, the routine TIMER INTERRUPT CI2 will be described. When the timerT1 which is started after being reset in the above-described routineCOUNTER INTERRUPT CI2 has counted a predetermined value, the routineTIMER INTERRUPT TI2 shown in FIG. 8 is executed. Firstly, determiningthat the AF lens has reached the endmost position (the infinity positionor the nearest position), the subroutine STOP AF LENS is executed (step#300). Then, a flag LEEDF showing that the flow is executed is set (step#305), the timer interrupt TI2 is inhibited, and the process returns(step #310).

The subroutine STOP AF LENS which is called at the above-described steps#265 and #300 is shown in FIG. 9. When the subroutine is called,firstly, a control signal for short-circuiting between both terminals ofthe AF motor M1 is outputted from the in-body microcomputer μC1 to themotor drive circuit MD1 for 10 msec. in order to halt the AF motor M1(step #350). Then, a control signal for cutting off the power supply tothe AF motor M1 is outputted from the in-body microcomputer μC1 to themotor drive circuit MD1 (step #355), the flag LMVF showing that the lensis being moved is reset, and the process returns (step

Returning to the flow chart shown in FIG. 6, the description will becontinued. When the process returns from the subroutine LENS DRIVE, thetimer interrupt TI2 is permitted (step #160}, and the process waitsuntil the flag LEEDF showing that the lens has reached the endmostposition is set (step #165). Since the drive amount N is set to -N_(LG)which is a negative value having a large absolute value at step #152,the drive amount N never becomes N=0 by the counter interrupt CI2 beforethe lens reaches the endmost position. Thus, the lens never stops on theway. That is, since no lenses have a drive amount where the drive amountN may becomes N=-N_(LG), when the drive amount N is set to -N_(LG), thelens always reaches the endmost position (the infinity position) withoutstopping on the way, and the flag LEEDF is set by the interrupt routineTIMER INTERRUPT TI2 which is thereafter executed. When it is determinedthat the flag LEEDF has been set at step #165, the process proceeds tostep #170. Then, determining that the lens has reached the infinityposition, a counter for counting a movement amount N_(F) of the lensfrom the infinity position is reset, the above-described flag LEEDF isreset, and the process returns (steps #170 and #175).

Returning to the flow chart shown in FIG. 5, the description will becontinued. When the process returns from the above-described subroutineAF LENS MOVE-IN, the process proceeds to step #50, where whether or notthe preparation switch S1 is ON is determined. When the preparationswitch S1 is not ON, the process proceeds to step #62, where asubroutine FINDER SENSING is executed. Thereafter, the process proceedsto step #60.

The subroutine FINDER SENSING is shown in FIG. 10 and will be describedwith reference to the figure. When the subroutine is called, firstly, aflag EPF showing that the finder is being looked into is reset (step#200), and whether or not the grip switch S_(GR) is ON is determined(step #202). When the grip switch S_(GR) is not ON, a timer interruptTI1 is inhibited, a flag SlONF is reset which is set when the gripswitch S_(GR) is ON or when less than five minutes have passed since theswitch S_(GR) is turned off, and the process returns (steps #236 and#235). When the grip switch S_(GR) is ON, a signal representing a startof the light emitting is outputted to the finder sensing circuit EPD(step #205). Thereby, infrared ray is emitted by the LED of the findersensing circuit EPD. Thereafter, the in-body microcomputer μC1 waits for50 msec. and receives a sensing signal from the finder sensing circuitEPD (step #210). Then, it is determined from the sensing signal whetheror not the finder sensing has been performed, that is, whether or notthe user is looking into the finder (step #215). When it is detectedthat the user the looking into the finder, a flag EPF showing that theuser is looking into the finder is set, the subroutine SlON is executed,and the process returns (step #216 and #217). When it is not determinedthat the user is looking into the finder at step #215, the timerinterrupt TI1 is permitted, a timer T_(INT) thereof is reset andstarted, and the process returns (steps #225 and #230). The timerinterrupt TI1 is generated every 250 msec. When the interrupt isgenerated, after the above-described subroutine FINDER SENSING isexecuted as shown in FIG. 12 (step #240), the process proceeds to step#60 of FIG. 5. When only the finder sensing is performed, the subroutineSlON (step #55 of FIG. 5) is not executed, and determining that only thefinder is being looked into and that the succeeding operations will notbe performed, the holding of electric power is not performed (step #510of FIG. 13A). Thus, power consumption can be reduced.

Returning to the flow chart shown in FIG. 5, when it is determined thatthe preparation switch S1 is ON at the above-described step #50, theprocess proceeds to step #55, where the subroutine SlON is executed andit is determined whether or not the flag SlONF has been set which is setwhen the preparation switch S1 is ON or when less than five minutes havepassed since the preparation switch is turned off (step #60). When theflag SlONF has been set, the process returns to step #55, where thesubroutine SlON is repeatedly executed until the flag SlONF is reset.When the flag SlONF has not been set, the process proceeds to step #65,where the level of each of the power controlling terminals PW1 and PW2is changed to low to disable the power-supply transistors Tr1 and Tr2.Then, the level of the power controlling terminal PWO is changed to lowto stop the operation of the DC/DC converter DD, a flag SlONIF is reset,and the process waits for an interruption (steps #70 to #73).

When the grip switch S_(GR) or the preparation switch S1 is turned fromoff to on, an interrupt SIINT is executed, and the process from step #50is executed.

The subroutine SlON is shown in FIGS. 13A and 13B. When the subroutineis called, firstly, it is determined whether or not the flag SlONIFshowing that the subroutine SlON is executed for the first time has beenset (step #500). When it has not been set, the flag SlONIF is set,first-time communication data to be transmitted to the in-lensmicrocomputer μC2 are set, and the process proceeds to step #504. Whenthe flag SlONIF has been set, the first-time communication data arereset, and the process proceeds to step #504. At step #504, whether ornot the preparation switch S1 is ON is determined. When the preparationswitch S1 is ON, the timer interrupt TI1 is inhibited, and the processproceeds to step #506. When the preparation switch S1 is not ON, theprocess proceeds directly to step #506. The interrupt SIINT is inhibitedat step #506. Thereafter, the level of each of the power controllingterminals PW1 and PW2 is changed to high to activate the transistors Tr1and Tr2, and the subroutine LENS COMMUNICATION LCM1 is executed (steps#510 and #515). Then, the subroutine CARD COMMUNICATION CCM1 is executed(step #520).

The subroutine CARD COMMUNICATION CCM1 is shown in FIG. 16. When thesubroutine is called, firstly, the level of the terminal CSCD is changedto low to inform the in-card microcomputer μC3 that a communication willbe performed with the IC card (hereinafter referred to as card) insertedinto the inserting portion 13 of the camera body BD, and data showingthat the communication is a card communication of the communication modeCM1 are set (steps #930 and #932). Then, an output mode is set, a serialdata communication is performed once and the in-card microcomputer μC3is informed that the communication is the card communication of thecommunication mode CM1 (steps #934 and #936). In a single serial datacommunication (that is in a single SIO), 8-bit data are transmitted,which is the same in the hereinafter-described communications. After theprocess waits for a time required for the in-card microcomputer μC3 toexecute a predetermined process, a serial data communication isperformed one more time (steps #938 and Then, the level of the terminalCSCD is changed to high to inform the in-card microcomputer μC3 of acompletion of the data communication, and the process returns (step#942). The data transmitted at step #940 are data showing a condition ofeach of:

the card switch S_(CD) on the camera body BD;

the release switch S2;

the learning mode switch S3;

the single-frame advance mode/continuous advance mode switch S_(SC) ;

and the switch S_(HL) for sensing whether the camera is heldlongitudinally or horizontally,

and the data showing whether or not the data communication is performedfor the first time.

Returning to the flow chart shown in FIG. 13A, the description will becontinued. When the process returns from the subroutine CARDCOMMUNICATION CCM1, after the process waits for a time required for acontrol performed by the in-card microcomputer μC3 in response to theabove-described data, the subroutine CARD COMMUNICATION CCM2 is executed(steps #515 and #530).

The subroutine CARD COMMUNICATION CCM2 is shown in FIG. 17. When thesubroutine is called, firstly, the level of the terminal CSCD is changedto low to select the card as the partner of the communication, and datashowing that the communication is a card communication of thecommunication mode CM2 is set (steps #944 and 946). Then, an output modeis set, a serial data communication is performed once, and the in-cardmicrocomputer μC3 is informed that the communication is the cardcommunication of the communication mode CM2 (steps #948 and #950). Then,an input mode is set, and after the process waits for a time requiredfor a control by the in-card microcomputer μC3, the serial datacommunication is performed one more time. In the communication, the dataare inputted into the in-body microcomputer μC1 which show an ON/OFF ofa card control, a one shot/continuous of AF and an ON/OFF of an APZ(steps #955 to #965). The card control is that an exposure, etc. of acamera, is performed based on data which are set by the in-cardmicrocomputer μC3. The one shot of AF is that a focusing operation whenthe is performed only once preparation switch S1 is turned on (or whenthe finder is looked into). The continuous of AF is that the focusingoperation is continuously performed following a change of a subjectwhile the preparation switch S1 is ON (or while the finder is beinglooked into). An ON/OFF of an APZ is whether or not a focal length isdetermined according to a subject distance (that is, based on a zoomprogram line). After the above-described data are inputted into thein-body microcomputer μC1 at step #965, the level of the terminal CSCDis changed to high to complete the data communication with the card, andthe process returns (step #970).

Returning to the flow chart shown in FIG. 13A, the description will becontinued. When the process returns from the subroutine CARDCOMMUNICATION CCM2, whether or not the flag EPF showing that the user islooking into the finder has been set is determined (step #532). When ithas been set, a subroutine AF CONTROL is executed (step #540). When theflag EPF has not been set, whether or not the preparation switch S1 isON is determined at step #535. When the preparation switch S1 is ON, thesubroutine AF CONTROL (a control of an automatic focusing operation) isexecuted (step #540).

The subroutine AF CONTROL is shown in FIG. 20. When the subroutine iscalled, firstly, whether or not a flag AFEF showing that an in-focuscondition is obtained has been set is determined (step #1100). When ithas been set, whether or not a continuous AF has been set is determined(step #1105). When the continuous AF has not been set, the processreturns. When the continuous AF has been set, the process proceeds tostep #1110. When the flag AFEF showing that an in-focus condition isobtained has not been set at step #1100, the process also proceeds tostep #1110. At step #1110, the CCD provided in the focus detection lightreceiving circuit AF_(CT) is made to perform an integration (chargeaccumulation). After the integration by the CCD is completed, outputdata of the CCD converted into a digital signal are inputted (data dump)into the in-body microcomputer μC1 (step #1115). A defocus amount DF iscalculated from the data (step #1120). A drive amount (AF lens drivepulse count) N=DF×K_(L) is obtained by multiplying the defocus amount DFby the drive amount converting coefficient K_(L), and the processreturns (step #1125). Then, whether or in-focus condition is obtained isnot an determined from the drive amount N (step #1130). When an in-focuscondition is obtained, the flag AFEF is set, a movement amount N_(F) ofthe AF lens is read in, and a distance from a subject (a subjectdistance) DV is calculated from the movement amount N_(F) and thedistance converting coefficient K_(N) (steps #1135 to #1138). Thesubject distance DV is shown in a logarithmic form. Then, a focal lengthf_(CA) is determined to determine a size (that is, magnification) of asubject according to the subject distance. To determine a focal lengthaccording to a subject distance as describe above (or to perform azooming operation based on a focal length which is determined in theabove manner) is referred to as "auto program zoom" or "APZ". In thein-card microcomputer μC3, a focal length can be determined according toa subject distance as described later. When the control is performedbased on data determined by the in-body microcomputer μC1, themagnification is fixed at 1/60. The focal length f_(CA) correspondingthereto is obtained by accessing a predetermined memory by using thesubject distance DV calculated at step #1137 as an address (step #1138).Then, whether or not the obtained focal length f_(CA) exceeds themaximum focal length f_(max) of the employed lens is determined (step#1139). When it exceeds the maximum focal length f_(max), the focallength f_(CA) is re-set to the maximum focal length f_(max), and theprocess returns (step #1140). When it does not exceed the maximum focallength f_(max), the process proceeds to step #1141, where whether or notthe focal length f_(CA) is smaller than the minimum focal length f_(min)of the employed lens is determined. When it is smaller than the minimumfocal length f_(min), the focal length f_(CA) is re-set to the minimumfocal length f_(min), and the process returns (step #1142). When it isnot smaller than the minimum focal length f_(min), the process returns.

When it is determined that an in-focus condition is not obtained at step#1130, after the timer interrupt TI2 is permitted, a driving of the AFlens is started, the flag AFEF showing that an in-focus condition isobtained is reset, and the process proceeds to step #1136 (steps #1143to #1150).

Returning to the flow chart shown in FIG. 13A, the description will becontinued. After returning from the above-described subroutine AFCONTROL, the process proceeds to step #560. When it is determined thatthe preparation switch S1 is not ON at step #535, the process proceedsto step #545, where whether or not the flag LMVF showing that the AFlens is being moved has been set i s determined. When the flag LMVF hasbeen set, after the subroutine STOP AF LENS is executed at step #550,the process proceeds to step #560. When the flag LMVF has not been set,skipping step #550, the process proceeds to step #560. At step #560, afilm sensitivity SV is inputted from the film sensitivity readingcircuit DX, and at step #565, a luminance BV_(o) of an object when anaperture is opened is inputted from the photometry circuit LM. The datainput will be described. Firstly, the level of the terminal CSDX or theterminal CSLM is changed to low to select a circuit (DX or LM) intowhich the data are to be inputted. Then, the data are inputted throughthe terminal SIN. After the data are inputted, the level of the terminalCSDX or the terminal CSLM is changed to high, and the data input iscompleted. After the data are inputted as described above, a subroutineCARD COMMUNICATION CCM3 is executed to transmit these data, etc. (step#570).

The subroutine CARD COMMUNICATION CCM3 is shown in FIG. 18. When thesubroutine is called, firstly, the level of the terminal CSCD is changedto low to show the in-card microcomputer μC3 a request for a datacommunication, and data showing that the communication is a cardcommunication of a communication mode CM3 are set (steps #975 and #980).Then, the output mode is set, and a serial data communication isperformed once (steps #985 and #990). Thereafter, after the processwaits for a time required for the in-card microcomputer μC3 to performnecessary calculations, a serial data communication is performed seventimes, and the level of the terminal CSCD is changed to high (step #995to #1010). Then, the in-card microcomputer μC3 is informed that the datacommunication is completed, and the process returns. The following arethe data transmitted to the in-card microcomputer μC3 at step #1005 ofthe subroutine CARD COMMUNICATION CCM3:

the present focal length f_(p) ;

the minimum focal length f_(min) ;

the maximum focal length f_(max) ;

the photometry value BV_(o) ;

the film sensitivity SV;

the open aperture value AV_(o) ; and

the maximum aperture value AV_(max).

Returning to the flow chart shown in FIG. 13A, the description will becontinued. When the process returns from the above-described subroutineCARD COMMUNICATION CCM3, a subroutine EXPOSURE CALCULATION (shown inFIG. 22) is executed at step #575. When the subroutine is called,firstly, an exposure value EV is calculated by EV=BV_(o) +AV_(o) +SV(step #1285). BV_(o) represents an object luminance which is measured inan exposure measurement at open aperture, AV_(o) represents an openaperture value, and SV is a film sensitivity. From the exposure valueEV, a shutter speed TV and an aperture value AV are calculated based ona predetermined AE program line, and the process returns (step #1290).The AE program line is a program line for providing a relation betweenthe shutter speed and the aperture value. A description and drawingthereof are omitted in this specification. However, since the shutterspeed and the aperture value are calculated based on the AE program linein the cards to be described later, a specific description thereof willbe given when operations of the cards are described.

After the above-described subroutine EXPOSURE CONTROL is executed, asubroutine CARD COMMUNICATION CCM4 (shown in FIG. 19) is executed toinput the exposure value EV calculated by the in-card microcomputer μC3and other information (step #580). The detailed description of thesubroutine is omitted, since the subroutine is the same as thesubroutine CARD COMMUNICATION CCM2 (shown in FIG. 17) except that thecommunication mode which is set at step #1020 is a communication modeCM4 and that a serial communication is performed three times at step#1045. The following are the data inputted from the in-cardmicrocomputer μC3 in this communication:

a card-side calculation shutter speed TV_(CD) ;

a card-side calculation aperture value AV_(CD) ; and

a card-side calculation focal length f_(CD).

After the above-described subroutine CARD COMMUNICATION CCM4 isexecuted, whether or not an exposure control, etc. is to be performedbased on the data of the card is determined based on the data obtainedin the card communication CCM4 and the data obtained therebefore (step#585). The subroutine CARD CONTROL is shown in FIG. 23. When thesubroutine is called, whether or not the card control is to be performedis determined based on the data, inputted from the in-card microcomputerμC3 to the in-body microcomputer μC1 in the card communication CCM2, Onwhether or not the card control is ON (step #1305). When the cardcontrol is performed (that is, when an exposure, etc. of a camera isperformed based on data set by the in-card microcomputer μCa), a controlshutter speed TV_(C), a control aperture value AV_(C) and a focal lengthf_(C) are respectively set to the shutter speed TV_(CO), the aperturevalue AV_(CD) and the focal length f_(CD) which are calculated by thein-card microcomputer μC3 (steps #1310 to #1317). Then, whether or notthe APZ is ON is determined based on the data inputted from the in-cardmicrocomputer μC3. When the APZ is ON, the subroutine LENS COMMUNICATIONLCM2 is executed, the target focal length f_(C) is transmitted to thein-lens microcomputer μC2, and the process returns (steps #1318 and#1319). When the APZ is not ON, the process returns without executingthe subroutine LENS COMMUNICATION LCM2. The description of thesubroutine LENS COMMUNICATION LCM2 is omitted, since the subroutine is,as shown in FIG. 15, the same as the subroutine LENS COMMUNICATION LCM1(shown in FIG. 11) except that the data are outputted from the in-bodymicrocomputer μC1 to the in-lens microcomputer μC2 at step #920. On theother hand, when a camera control is performed (that is, when anexposure of a camera is performed based on data obtained by the in-bodymicrocomputer μC1) at step #1305, the control shutter speed TV_(C), thecontrol aperture value AV_(C) and the focal length f_(C) arerespectively set to the shutter speed TV, the aperture value AV and thefocal length f_(CA) which are calculated by the in-body microcomputerμC1 at step #575 (steps #1320 to #1327), and the process proceeds tostep #1318.

Returning to the flow chart shown in FIG. 13A, the description will becontinued. When the process returns from the above-described subroutineCARD CONTROL, data showing the control shutter speed TV_(C), the controlaperture value AV_(C), whether or not the card function is ON (that is,whether or not the card control is ON) and that the learned APZ is beingperformed are serially outputted to the display control circuit DISPC.The display control circuit DISPC makes the display portion DISP on thecamera body BD display based on the above-described inputted data (step#590). FIG. 14 shows a content of the display by the display portionDISP on the camera body BD. In the figure, 101 shows a sign which isdisplayed when the card function is ON, and 102 shows a sign which isdisplayed when the learned APZ is being performed. The numeral display103a shows a shutter speed. The numeral display 103b shows an aperturevalue. These numerals are displayed based on the data serially outputtedfrom the in-body microcomputer μC1 to the display control circuit DISPC.

When the display (step #590) is completed, whether or not the releaseswitch S2 is ON is determined at step #595. When the release switch S2is ON, whether or not an in-focus condition is obtained is determinedfrom the flag AFEF at step #610. When an in-focus condition is obtained(that is, AFEF-1), the process proceeds to step #615. When an in-focuscondition is not obtained, the process proceeds to step #638, a releaseoperation not being performed. At step #615, all the interrupts areinhibited. Then, an exposure control is performed, and after theexposure control is completed, the film is advanced by a frame (steps#620 and #625). Then, the flag SlONF is reset to show that thesubroutine SlON is completed, the interrupt SIINT by a turning on of thepreparation switch S1 is permitted, and the process returns (steps #630and #635).

When it is determined that the release switch S2 is not ON at step #595,the process proceeds to step #638 similarly to the case where it isdetermined that an in-focus condition is not obtained at step #610. Atstep #638, whether or not the preparation switch S1 is ON is determined.When the preparation switch S1 is ON, a timer T2 for maintainingelectric power is reset and started at step #640. Then, the flag SlONF(which is set when the preparation switch is ON or when less than fiveminutes have passed since the preparation switch S1 is turned off) isset, and the process returns (step #642). On the other hand, when it isdetermined that the preparation switch S1 is not ON at step #638,whether or not the flag EPF showing the finder sensing has been set isdetermined (step #644). When the flag EPF has been set, the processreturns to step #500. When the flag EPF has not been set, the processproceeds to step #650, where whether or not a zooming operation is beingperformed is determined from the zoom switch data. When a zoomingoperation is being performed, the process proceeds to step #640, wherethe timer T2 for maintaining electric power is reset and started toprolong a power maintained time. Then, the flag SlONF is set, and theprocess returns (step # 642). When it is determined that a zoomingoperation is not being performed at step #650, whether or not the flagSlONF has been set is determined (step #652). When it has not been set,the process returns. Thereby, although the subroutine SlON is executedwhen the finder is looked into by the user, the maintenance of electricpower is stopped when the user stops looking into the finder to reducepower consumption. That is, when the process returns from the subroutineSlON to the routine RESET (shown in FIG. 5), since the flag SlONF hasbeen reset, the power-supply transistors Tr1 and Tr2 are disabled tostop the operation of the DC/DC converter DD (steps #60 to #70). On theother hand, when it is determined that the flag SlONF has been set atstep #652, the process proceeds to step #655, where whether or not thetimer T2 for maintaining electric power has counted five seconds isdetermined. When five seconds have not passed, the process returns. Whenfive seconds have passed, the process proceeds to step #630, where acompletion of photographing by a turning off of the preparation switchS1 is controlled.

Returning to the flow chart shown in FIG. 5, a case where it isdetermined that the main switch S_(M) is not ON at step #20 will bedescribed. In this case, the process proceeds to step #80, where theinterrupts other than the interrupt SMINT by the switch S_(M) areinhibited. Then, a subroutine AF LENS MOVE-IN is executed (step #90).Thereby, the AF lens is moved to the endmost position on the infinityside. A detailed description thereof is omitted, since this has alreadybeen described. After the subroutine AF LENS MOVE-IN is executed, thelevels of the terminals PW1 and PW2 are changed to low to disable thetransistors Tr1 and Tr2 for supplying power to the circuits of thecamera body and to the zoom motor M3 of the lens (step #120). Then, thelevel of the terminal PWO is changed to low to disable the DC/DCconverter DD, the interrupts other than the interrupt SMINT by a turningon of the main switch S_(M) are inhibited, and the process halts (thatis, the in-body microcomputer μC1 enters the sleep condition) (steps#125 and #130).

Finishing a description of the software of the in-body microcomputerμC1, the software of the in-lens microcomputer μC2 will hereinafter bedescribed.

When the lens LE is not attached to the camera body the circuits of thelens are not activated at all, since the lens attachment detectingswitch S_(LE) shown in FIG. 4 is ON and the level of the reset terminalRE2 of the in-lens microcomputer μC2 is maintained low. When the lens LEis attached to the camera body BD, the lens attachment switch S_(LE) isturned off, a signal whose level changes from low to high is inputtedinto the reset terminal RE2. Thereby, the in-lens microcomputer μC2executes a routine RESET shown in FIG. 24. In the routine RESET, afterports and registers are reset (step #L5), the process halts (that is,the in-lens microcomputer μC2 enters the sleep condition).

Next, a process when a CS interrupt is executed will be described. Whena signal whose level changes from high to low is transmitted from thein-body microcomputer μC1 to the terminal CSLE of the in-lensmicrocomputer μC2, the in-lens microcomputer μC2 executes a routine CSINTERRUPT shown in FIG. 25. In the routine, firstly, a two-byte serialcommunication (serial input/output) is performed in response to a clockfrom the in-body microcomputer μC1 (step #L560). Then, data showing thepresent communication mode is inputted from in-body microcomputer μC1 bya one-byte serial communication (serial input/output), and thecommunication mode is determined (steps #L585 and #L590). Then, thefollowing process (a process corresponding to the lens communicationsLCM1 and LCM2 by the in-body microcomputer μC1) is executed according tothe result of the communication mode determination.

When the communication mode is the communication mode CM1, 13-byte dataare serially outputted to the in-body microcomputer μC1 (step #L620),and the process waits until the level of a signal to be inputted to theterminal CSLE is changed from low to high (step #L625). When the levelis changed to high, the process proceeds to step #L610, where asubroutine PZ is repeated. It is in order to confirm a completion of thecommunication between the in-lens microcomputer μC2 and the in-bodymicrocomputer μC1 that the process waits until the level of the signalto be inputted to the terminal CSLE is changed from low to high at step#L625. Thereby, other processes are not executed during thecommunication. A completion of the communication is confirmed similarlyin the communication mode CM2 (step #L635). Moreover, the CS interruptcan be executed while the subroutine PZ is repeated at step #L610. Inthis case, the interrupted routine is determined to be completed.

When the communication mode is the communication mode CM2, three-bytedata are serially inputted from the in-body microcomputer μC1 into thein-lens microcomputer μC2 (step #L630), and the process waits until thelevel of the signal to be inputted to the terminal CSLE is changed fromlow to high (step #L635). When the level is changed to high, the processproceeds to step #L610, where the subroutine PZ is repeated.

The above-described subroutine PZ is shown in FIG. 26, and will bedescribed with reference to the figure. When the subroutine is called,firstly, it is determined whether or not data showing the first datacommunication which is performed when it is sensed that the finder isbeing looked into or when the preparation switch S1 is operated aretransmitted from the in-body microcomputer μC1. When the data aretransmitted, a flag (an operation flag F) showing that a zoomingoperation has been performed is reset, and the process proceeds to step#L710. The operation flag F is reset only when the data communication isperformed for the first time, that is, only when the subroutine SlON isexecuted for the first time. When the data communication is notperformed for the first time and, therefore, the above-described dataare not transmitted, skipping step #L705, the process proceeds directlyto step #L710. At step #L710, the encoder ZVEN showing whether or notthe zooming ring is being operated is read in. At the next step #L715,whether or not a zooming operation is being performed is determined.When a zooming operation is being performed, the process proceeds tostep #L750, where the operation flag F showing that a zooming operationhas been performed is set. Then, a control signal is outputted to themotor drive circuit MD3 according to the direction and amount of theoperation to control the driving of the zoom lens unit (step #L755).Then, the flag ZMVF showing that the zoom lens unit is being moved isset, and the process returns (step #L760). The detail of the lenscontrol LC2 (step #L755) is omitted since it has no direct relation withthe present invention.

When it is determined that a zooming operation is not being performed atstep #L715, the process proceeds to step #L720, where whether or not theoperation flag F has been set is determined. When it has been set,determining that the user, judging that the focal length (angle of view)determined by the APZ is inappropriate, performs a zooming operation,the control of the APZ is not performed. That is, whether or not theflag ZMVF showing that the zoom lens unit is being moved has been set isdetermined (step #L730). When it has not been set, the process returns.When it has been set, determining that the zooming operation is stopped,after resetting the flag ZMVF by stopping the zoom lens unit, theprocess returns (steps #L735 and #L737). On the other hand, when it isdetermined that the operation flag F has not been set at step #L720, theprocess proceeds to step #L725, where whether or not the APZ is ON (thatis, whether or not a target focal length of zooming is determinedaccording to a subject distance) is determined based on the datatransmitted from the in-body microcomputer μC1. When the APZ is ON, thefocal length f_(C) transmitted from the in-body microcomputer μC1 is setto a focal length f_(LC) for driving the lens. Then, the zoom lens unitis moved until the above-described focal length is obtained. After thedriving is completed, the process returns (steps #L740 and #L745). Whenthe APZ is not ON, the process directly returns. The detail of the lenscontrol LC1 (step #L745) is omitted, since it has no direct relationwith this application.

Finishing description of the software of the in-lens microcomputer μC2,the software of the in-card microcomputer C3 will hereinafter bedescribed.

For the camera system of this embodiment, Sports Card, Auto Depth Card,Portrait Card, etc. can be used as the above-described IC card. Theoperations of Sports Card, Auto Depth Card and Portrait Card willhereinafter be described along with a description of the software of thein-card microcomputer μC3.

Firstly, Sports Card will be described.

Sports Card is an IC card suitable for photographing a moving objectsuch as an object playing a sport. When photographing is performed withthe card attached to the camera body, the AE program line of the camerashifts toward a high speed side, so that photographing can be performedat a high shutter speed. Now, the operation of the card will bedescribed.

When Sports Card is attached to the camera, or when a battery isattached to the camera under a condition where Sports Card is attached,the level of the reset terminal RE3 is changed from low to high, aroutine RESET shown in FIG. 27 is executed. In the routine, all theflags and registers (RAM) are reset, and the in-card microcomputer μC3enters the sleep condition (step S-5). At this time, the learning modeis set to an ON mode.

Then, when a signal whose level changes from high to low is transmittedfrom the in-body microcomputer μC1 to the terminal CSCD of Sports Card,the in-card microcomputer μC3 of Sports Card executes a routineINTERRUPT shown in FIG. 28. In the routine, the in-card microcomputerμC3 of Sports Card performs a serial communication (a transmission ofeight-bit data) once in synchronism with a clock transmitted from thein-body microcomputer μC1 to input data showing a mode of the cardcommunication (step S-15). Then, which of the card communications CCM1to CCM4 (the communication modes CM1 to CM4 correspond to the cardcommunications CCM1 to CCM4, respectively) is the present cardcommunication is determined from the data showing a mode, and a processaccording to the kind of communication is executed.

That is, firstly, whether or not the communication is the cardcommunication CCM1 is determined (step S-20). When it is the cardcommunication CCM1, the in-card microcomputer μC3 is made the datainputted side (step S-35), and a serial communication is performed (stepS-30) to receive data from the in-body microcomputer μC1. A subroutineDATA SETTING is executed based on the data (step S-35), and thereafter,the in-card microcomputer μC3 enters the sleep condition. Thedescription of the detail of the data transmitted between the in-bodymicrocomputer μC1 and the in-card microcomputer μC3 is omitted, since ithas already been described in the description of the subroutine CARDCOMMUNICATION CCM1 (shown in FIG. 16) executed by the in-bodymicrocomputer μC1. The description of the transmitted data in the cardcommunications CCM2 to CCM4 (shown in FIGS. 17 to 19) are also omitted.

Now, the subroutine DATA SETTING is described with reference to FIG. 29.When the subroutine is called, firstly, whether or not the card switchS_(CD) is ON is determined at step S-430. When the card switch S_(CD) isOFF, a flag S_(CD) F is reset, and the process returns (step S-460).When the card switch S_(CD) is ON, whether or not the flag S_(CD) F hasbeen set is determined at step S-435. When it has been set, determiningthat the switch S_(CD) continues being operated, the process returns.When the flag S_(CD) F has not been set, after the flag S_(CD) F is set(step S-440), whether or not the card function is present ON isdetermined (step S-445). When the card function is ON, the data showingthat the card control is not ON (that is, the data showing that the cardfunction is OFF) are set as the data to be outputted to the in-bodymicrocomputer μC1 in the card communication CCM2. When the card functionis OFF, the data showing that the card control is ON (that is, the datashowing that the card function is ON) are set. By the setting of thedata showing whether or not the card control is ON, the ON and OFF ofthe card control is alternately switched every time the card switchS_(CD) is turned on. After the setting of the data showing the ON/OFF ofthe card control, the process proceeds to step S-463, where a control oflearning is performed.

That is, at step S-463, whether or not the switch S3 showing a change ofa learning mode is turned from off to on is determined. When it isturned from off to on, the learning mode is cyclically switched among anON mode where learning is performed, an OFF mode where learning is notperformed and a reset mode where contents of learning are reset, everytime the switch S3 is turned from off to on (step 5-465), and theprocess proceeds to step S-470. When it is determined that the switch S3is not turned from off to on at step S-463, the process proceeds to stepS-470 without changing the learning mode. At step #S-470, whether or notthe release switch S2 is ON is determined based on the data transmittedfrom the in-body microcomputer μC1 in the card communication CCM1. Whenit is not ON, the process proceeds to step S-475, where a flag(continuous advance mode flag F) showing the continuous advance mode isreset, and the process returns. When the release switch S2 is ON, theprocess proceeds to step S-480, where whether or not the continuousadvance mode has been set is determined based on the data transmittedfrom the in-body microcomputer μC1 (that is, the data on thesingle-frame advance/continuous advance switch S_(SC)). When thecontinuous advance mode has been set, whether or not the continuousadvance mode flag F showing the continuous advance mode has been set isdetermined (step S-485). When the flag has been set, determining thatthe flow is executed again while the release switch 52 is ON, theprocess returns without performing learning. This is because in thecontinuous advance mode, learning is performed only for a photographingof the first frame and is not performed for that of the second andsucceeding frames. Thereby, it is avoided that the similar photographingscenes are repeatedly learned, and only different photographing scenesare learned.

When it is determined that the continuous advance mode has not been setat step S-480, the process proceeds to step S-495, where a subroutineLEARNING is executed, and the process returns. When the continuousadvance mode flag F has not been set at step #485, since thephotographing of the first frame in the continuous advance mode is beingperformed, after the continuous advance mode flag F is set (step S-490),the subroutine LEARNING is executed, and the process returns.

Now, the subroutine LEARNING shown in FIG. 32 will be described. Whenthe subroutine is called, firstly, whether or not the present learningmode is the OFF mode is determined (step S-500). When it is the OFFmode, the process returns without performing learning. When it is notthe OFF mode, the process proceeds to step S-505, where whether or notthe present learning mode is the reset mode is determined. When it isthe reset mode, an E² PROM (a programmable ROM which is electricallyre-writable) for learning which is incorporated in the card is reset(represented by Δf=0 to be described later), and the process returns.When the present learning mode is not the reset mode, the processproceeds to step S-520, where whether or not the focal length f_(CD)determined by the in-card microcomputer μC3 is between the minimum focallength f_(min) and the maximum focal length f_(max) of the employedinterchangeable lens is determined. When the focal length f_(CD) is notwithin the range (f_(min) ≦f_(CD) ≦f_(max)), since it is meaningless tolearn an unsettable focal length, the process returns without performinglearning. When the focal length f_(CD) is within the range (f_(min)≦f_(CD) ≦f_(max)), the process proceeds to step S-525, where whether ornot the camera is longitudinally held is determined based on the datafrom the in-body microcomputer μC1 (that is, the data on the switchS_(HL)). When the camera is longitudinally held, the focal length f_(CD)determined by the in-card microcomputer μC3 is multiplied by 1/1.3 (aratio of the magnification when the camera is longitudinally held tothat when the camera is horizontally held), and the result of themultiplication is set as a new f_(CD). Then, the process proceeds tostep S-530, where a subroutine LR is executed to determine whether ornot the the focal length should be appropriate for learning (that is,the focal length is within a predetermined learning range). Since thefocal length f_(CD) is shown in logarithmic form, " to multiply by1/1.3" means "to subtract log1.3" in the actual calculation.

The subroutine LR is shown in FIG. 33. When the subroutine is called,firstly, a flag LRF showing that learning should not be performed isreset (step S-600). Then, whether or not the focal length f_(B) (alatest focal length in actual photographing) of the camera body is equalto or longer than 1/2 times the focal length f_(CD) determined by thein-card microcomputer μC3 and is equal to or shorter than twice thefocal length f_(CD) is determined (step S-605). When the focal lengthf_(B) is within the range, the process returns. When it is not withinthe range, after the flag LRF is set, the process returns (step S-610).When the difference (the difference between f_(CD) and f_(B)) is toolarge as described above, the photographing situation is different fromthe photographing situation for Sports Card in this embodiment.Therefore, determining that it is not an object of this embodiment tochange (learn) the zoom program line for providing a relation between asubject distance and a focal length based on the large difference,learning is not performed.

Returning to the flow chart shown in FIG. 32, the description will becontinued. When the process returns from the above-described subroutineLR, whether or not the flag LRF showing that learning should not beperformed has been set is determined (step S-535). When it has been set,determining that learning should not be performed, the process returns.When it has not been set, a difference Δf₁ =f_(B) -f_(CD) between thefocal length f_(B) (a latest focal length in actual photographing) ofthe camera and the focal length f_(CD) obtained by the in-cardmicrocomputer μC3 (see steps S-830 to S-870 in a subroutine AECALCULATION to be described later with reference to FIG. 30B) isobtained (although it is actually a ratio, a difference is obtainedsince the focal length is shown in logarithmic form) (step S-545).Moreover, the previous difference Δf minus the above-describeddifference Δf₁ between the focal lengths, that is, Δf-Δf₁ is set as anew difference Δf (step S-550). After the new difference Δf is writtenand stored in the E² ROM provided in the card (step S-555), the processreturns.

Returning to the flow chart shown in FIG. 28, a case will be describedwhere it is determined that the present communication is not the cardcommunication CCM1 at step S-20. In this case, the process proceeds tostep S-40, where whether or not the present communication is the cardcommunication CCM2 is determined. When it is the card communicationCCM2, the data which are set as described above and predetermined dataparticular to the card, that is, the data showing an ON/OFF of the cardcontrol, the continuous AF and an ON of the APZ are outputted from thein-card microcomputer μC3 to the in-body microcomputer μC1 (step S-45),and after a serial communication is performed, the in-card microcomputerμC3 enters the sleep condition (step S-50). In Sports Card, the APZ isalways set to be ON in the above data. This is in order to change a size(magnification) of a moving object in response to a movement of theobject.

When it is determined that the present communication is not the cardcommunication CCM2 at step S-40, the process proceeds to step S-51,where whether or not the present communication is the card communicationCCM3 is determined. When it is the card communication CCM3, the in-cardmicrocomputer μC3 is made the data inputted side (S-52) , and a serialcommunication is performed to input the data of the camera (step S-53).At the next step S-54, the subroutine AE CALCULATION for calculatingdata for controlling the camera (including a calculation of a focallength) is executed, and then, the in-card microcomputer μC3 enters thesleep condition. The subroutine AE CALCULATION will be described laterwith reference to FIGS. 30A and 30B. As described in the description ofthe subroutine CARD COMMUNICATION CCM3 (shown in FIG. 18), the datatransmitted from the in-body microcomputer μC1 at step S-53 are asfollows:

the present focal length f_(p) ;

the minimum focal length f_(min) ;

the maximum focal length f_(max) ;

the photometry value BV_(o) ;

the film sensitivity SV;

the open aperture AV_(o) ; and

the maximum aperture value AVmax.

When it is determined that the present communication is not the cardcommunication CCM3 at step S-51, determining that the presentcommunication is the card communication CCM4, the process proceeds toS-60, where the in-card microcomputer μC3 is made the data outputtingside. Then, the data calculated by the in-card microcomputer μC3, thatis, the shutter speed TV_(CD) =TV_(c), the aperture value AV_(CD)=AV_(c) and the target focal length f_(CD) (see the subroutine AECALCULATION shown in FIGS. 30A and 30B) are transmitted to the in-bodymicrocomputer μC1 through a serial communication (step S-85), and thein-card microcomputer C3 enters the sleep condition.

Next, the subroutine AE CALCULATION (executed at step S-54 in FIG. 28)will be described with reference to the flow chart shown in FIGS. 30Aand 30B. When the subroutine is called, firstly, a shutter speed TV_(f)at a bending portion of the line (AE program line) of the AE calculationin the diagram shown in the FIG. 31 is calculated at steps S-700 toS-730.

That is, whether or not the focal length f_(P) (the present focal lengthinputted from the in-body microcomputer μC1 at step S-53 of FIG. 28) ofthe lens is equal to or longer than 50 mm is determined at step S-700.When f_(p) <50 mm, since there are little possibility of camera shake,the shutter speed TV_(f) is set to 9 and the program line is changed sothat the aperture is rather closed (step S-705). On the other hand, whenf_(p) ≧50 mm, assuming a case where a moving object located close to thecamera is taken in a large size, the program line is changed accordingto a magnification β as follows to increase a shutter speed (steps S-710to S-730):

TV_(f) 11 when β>1/50;

TV_(f) =10 when 1/100<β≦1/50; and

TV_(f) =9 when β≦1/100.

Next, an exposure value EV, is calculated from a photometry luminance (aluminance of a main object) BV_(s) (step S-735). Then, whether or notthe exposure value EV_(s) is not within a control limit (whether or notit exceeds AVmax+TVmax, or whether or not it is smaller than AV_(o)+TVmin) is determined (steps S-740 and S-750). When the exposure valueEV_(s) is not within the control limit, the control limit is set as thecontrol shutter speed TV_(c) and the control aperture value AV, (stepsS-745 and S-755).

When the exposure value EV, is within the control limit, a shutter speedTV=EV_(s) -AV_(o) at an aperture value of AV=AV_(o) is calculated, andwhether or not the shutter speed TV is equal to or smaller than theshutter speed TV_(f) of the bending portion of the AE program line isdetermined (steps S-760 and S-765). Then, when TV≦TV_(f), the controlaperture value AV_(c) and the control shutter speed TV_(c) arerespectively set to

    AV.sub.c =AV.sub.o

and

    TV.sub.c =TV,

and the process proceeds to step S-830. When TV>TV_(f), assuming thatthe AE program line is changed according to the focal length f_(p) andthe magnification β, the control aperture value AV_(c) and the controlshutter speed TV_(c) are obtained as follows.

That is, the AE program line is set so that the shutter speed is high toprevent a camera shake when the focal length is long and so that theaperture is rather closed, considering a depth of field, when the focallength is short. FIG. 31 shows such an AE program line of each of threelenses where f=35 mm and F=2.8, where f=105 mm and F=4.58 and wheref=210 and F=4. In the figure, f represents a focal length of each lensand F represents an F number of each lens. In FIG. 31, three linescorrespond to each of the lenses where f=105 mm and where f=210 mm, andeach line corresponds to a different magnification β. That is, thesethree lines respectively correspond to a magnification β of β≦1/100,that at a magnification β of 1/100<β≦1/50 and that at a magnificationβ>1/50, from the upper. Therefore, to obtain the aperture value AV fromthe above-described EV_(s) by use of the AE program line shown in FIG.31, as shown by steps S-775 to S-795, a different expression is usedaccording to a focal length f. Moreover, in the expression, a differentTV_(f) is used according to the magnification β (see steps S-710 toS-730). In the above description, three fixed focal length lenses aredescribed as an example. A similar AE program line can be used for zoomlenses.

Next, whether or not the aperture value AV obtained at steps S-775 toS-795 as described above is smaller than the maximum aperture valueAVmax is determined (step S-800). When AV≧AVmax, the control aperturevalue AV_(c) and the control shutter speed TV_(c) are respectively setto

    AV.sub.c =AVmax

and

    TV.sub.c =EV.sub.c -AVmax,

(step S-805), and the process proceeds to step S-830. When AV<AVmax, theshutter speed TV is set to TV=EV_(s) -AV (step S-810), and whether ornot the shutter speed TV is smaller (that is, the speed is lower) thanthe maximum shutter speed TVmax is determined (step S-815). WhenTV<TVmax, the control aperture value AV, and the control shutter speedTV_(c) are respectively set to

    AV.sub.c =AV

and

    TV.sub.c =TV,

(step S-820) and thereafter, the process proceeds to step S-830. WhenTV≧TVmax, the control shutter speed TV_(c) is set to TVmax as well asthe control aperture value AV_(c) is obtained again, that is, the abovetwo are respectively set to

    AV.sub.c =EV.sub.s -Tvmax

and

    TV.sub.c =TVmax,

(step S-825) and thereafter, the process proceeds to step S-830.

At steps from S-830, a calculation of the APZ, that is, a calculation ofthe focal length f_(CD) corresponding to a subject distance is performedbased on a zoom program line shown in FIG. 34 (a program line showing arelation between a subject distance and a focal length). In thisembodiment, of the focal lengths corresponding to the subject distanceDV (distance information shown in logarithmic form), only the focallengths corresponding to integral subject distances DV are stored in theROM in order to reduce a ROM capacity required for storing the zoomprogram line. And, since the subject distance DV is not generally aninteger, the zoom program line between adjacent two integers isinterpolated by a straight line to obtain the focal length fedcorresponding to the subject distance DV (see step S-850 to be describedlater). The calculation of the focal length fed will hereinafter bedescribed.

Firstly, an integer portion DV₁ of the subject distance DV (distanceinformation shown in logarithmic form) is taken out, a table in the ROMis accessed by using the integer portion DV₁ as an address to read out afocal length f_(1x) (a logarithm), and a focal length f_(2x) (alogarithm) is similarly read out by using an integer DV₁₊₁ which islarger than the DV₁ by 1 as an address (steps S-830 to S-840).Subsequently, a decimal portion DV_(o) is taken out, and the focallength f_(CD) to be calculated by the in-card microcomputer μC3 isobtained by

    f.sub.CD =f.sub.1x +(f.sub.2x -f.sub.1x)×DV.sub.o    (1)

(steps S-845 and S-850). Then, the learned value Δf (see step S-555 ofFIG. 32) is read out from the E² PROM, and the value Δf plus the focallength f_(CD) is set as a new f_(CD) (steps S-855 and S-860). At thenext step S-865, whether or not the camera is longitudinally held isdetermined. When the camera is not longitudinally held, the processreturns. When the camera is longitudinally held, after the focal lengthis increased by 1.3 times (since the focal length is shown in alogarithmic form, log1.3 is added to the f_(CD)), the process returns(step S-870).

As understood from the above-described calculation of the focal lengthf_(CD), in photographing under control of this card, the originalprogram line is shifted as a whole by the value Δf and a zooming isautomatically performed based on the shifted program line.

Secondly, Auto Depth Card will be described.

Auto Depth Card is a card suitable for taking, on a trip, in an event,etc., a photograph where both a person and the background are in focus.When photographing is performed with the card attached to a camera, thecamera is controlled so that both a person and the background are infocus. The operation of the card will hereinafter be described.

When Auto Depth Card is attached to a camera, a routine RESET shown inFIG. 35 is executed, and when a signal whose level changes from low tohigh is transmitted from the in-body microcomputer μC1 to the terminalCSCD of the in-card microcomputer μC3, a routine INTERRUPT shown in FIG.36 is executed. The description of the routines RESET and INTERRUPT isomitted, since they are the same as the routines RESET (shown in FIG.27) and INTERRUPT (shown in FIG. 28) of Sports Card. In the cardcommunication CCM2 in FIG. 36, the following data are transmitted fromthe in-card microcomputer μC3 to the in-body microcomputer μC1 (stepO-50):

an ON/OFF of the card control;

one-shot AF; and

an ON/OFF of the APZ.

A subroutine DATA SETTING shown in FIG. 37 will be described, as it ispartly different from the subroutine DATA SETTING (shown in FIG. 29) ofSports Card, and also, a subroutine LEARNING, shown in FIG. 39, which iscalled from the subroutine DATA SETTING and a subroutine LR, shown inFIG. 53, for determining in the subroutine LEARNING whether or not afocal length or a magnification should be learned (whether or not thefocal length or the magnification is within a predetermined learningrange) will be described.

The subroutine DATA SETTING shown in FIG. 37 is different from that(shown in FIG. 29) of Sports Card in that steps O-456 to O-458 areadded. At step O-456, whether or not the data communication is performedfor the first time after the finder sensing or SlON (that is, after theswitch S1 is turned on without the finder sensing) based on datatransmitted from the in-body microcomputer μC1. When the datacommunication is performed for the first time, the APZ operation isperformed, and when the data communication is not performed for thefirst time, the APZ operation is inhibited. That is, in this card andPortrait Card (to be described later), the APZ operation is performedonly when the subroutine SlON is executed for the first time after thecamera is activated. This is because the APZ operation is not requiredto be performed more than once since an object to be photographed isstationary.

Next, the subroutine LEARNING executed at step O-495 will be describedwith reference to FIG. 39. The description of steps O-500 to O-535 inthe figure is omitted, since they are the same as those of thesubroutine LEARNING (shown in FIG. 32) of Sports Card. Before thesubroutine LEARNING shown in FIG. 39 is described, the subroutine LRexecuted at step O-530 will be described with reference to FIG. 38, asit is different from the subroutine LR (shown in FIG. 33) of SportsCard.

When the subroutine LR is called, firstly, the flag LRF showing thatlearning should not be performed is reset (step O-600), and whether ornot the focal length f_(B) (a latest focal length in actualphotographing) of the camera body is equal to or larger than 28 mm andis equal to or shorter than 100 mm (that is, 28 mm≦f_(B) ≦100 mm) isdetermined (step O-605). When the focal length f_(B) is within therange, the magnification β is calculated (step O-610). Then, whether ornot the magnification β is equal to or a larger than 1/70 and is equalto or smaller than 1/160 is determined (1/70 is a magnification when asubject distance is 2 m and a focal length is 28 mm, and 1/160 is amagnification when a subject distance is 16m and a focal length is 100mm) (step O-615). When the magnification β is within the range, theprocess returns. On the other hand, when the magnification is not withinthe range, or when the focal length f_(B) of the camera body is notwithin the above-described range (28 mm≦f_(B) ≦100 mm), the flag LRFshowing that learning should not be performed is set, and the processreturns (step O-620). That is, in such a case, determining that thefocal length range and the magnification range are not those which arefrequently used for Auto Depth Card, that is, determining that it is aspecial case as a photographing with Auto Depth Card, learning is notperformed.

After whether or not the focal length and the magnification should belearned is determined as described above, the process from step O-545 isexecuted. Before these steps are described, the manner in which learningis performed by Auto Depth Card and Portrait Card will be described withreference to FIG. 40. In the figure, a zoom program line which is setbefore a learning of this time (hereinafter referred to as originalprogram line) is represented by p_(O), and a zoom program line which ischanged by the learning of this time, by p_(L).

Now, a subject distance is represented by DV and a focal length (alatest focal length in actual photographing) of the camera body isrepresented by f_(B). And it is assumed that the subject distance DVconsists of an integral portion DV₁ and a decimal portion DV_(o). Fromthe above-described original program line p_(O), the integral subjectdistance DV₁ and an integral subject distance DV₁₊₁ which is larger thanDV₁ by 1 correspond to a focal length f₁ and a focal length f₁₊₁,respectively. From these focal lengths f₁ and f₁₊₁, a focal lengthf_(CD) corresponding to the subject distance DV is obtained based on theoriginal program line p_(O). The L in the figure represents a differencebetween the focal length f_(CD) and the focal length f_(B) (a latestfocal length in actual photographing of the camera body), and a resultof a division of the difference L by a predetermined integer n isrepresented by Δf_(L). That is,

    Δf.sub.L =L/n=(f.sub.B -f.sub.CD)/n                  (2),

where a value of the integer n (n=1 to 3) is experimentally obtained. Inplace of the above equation, the following equation (3) may be used:

    Δf.sub.L =k·L=k·(f.sub.B -f.sub.CD)(3)

where k is a positive number equal to or smaller than 1 and the valuethereof is experimentally obtained.

As shown in FIG. 40, a straight line is drawn on which there are threepoints: a point with the subject distance DV and the focal length f_(CD)+Δf_(L), a point with the subject distance DV₁₋₁ and the focal lengthf₁₋₁, and a point with the subject distance DV₁₊₁ and the focal lengthf₁₊₁, and the line drawn as described above is made a learning line.Thus, a focal length f₁ ', for the subject distance DV₁, which is setafter learning is obtained by

    f.sub.1 '=f.sub.1 +Δf.sub.L /(1+DV.sub.o)            (4),

and a focal length f₁₊₁ ', for the subject distance DV₁₊₁, which is setafter learning is obtained by

    f.sub.1+1 '=f.sub.1+1 +Δf.sub.L /(2-DV.sub.o)        (5).

These values are stored in the ROM to change the zoom program line.

Returning to the flow chart shown in FIG. 39, the description will becontinued from step O-545. At step O-545, the above-described differenceΔfL is obtained by

    Δf.sub.L =(f.sub.B -f.sub.CD)/n                      (6).

Then, from focal lengths f_(1x) =f₁ and f_(2x) =f₁₊₁, set beforelearning, which have already been read out (see steps O-750 to O-755 ofFIG. 41C), a focal length f_(1x) ', for the subject distance DV₁, whichis set after the learning is obtained by

    f.sub.1x '=f.sub.1x +Δf.sub.L /(1+DV.sub.o)          (7),

and a focal length f_(2x) ', for the subject distance DV₁₊₁, which isset after the learning is obtained by

    f.sub.2x '=f.sub.2x +Δf.sub.L /(2-DV.sub.o)          (8)

(steps O-550 and O-555). In the zoom program line, the longer a subjectdistance is, the longer a focal length is. When this relation isreversed (that is, the increase is not monotonous), there are occasionswhere the user is given inconvenience by a sudden change of amagnification due to a variation of a subject distance. A process forpreventing such a reversal of the relation between a subject distanceand a focal length is executed at steps O-565 to O-585.

Firstly, a focal length fox corresponding to the subject distance DV₁₋₁is read out from the E² PROM at step O-565, and the focal length f_(ox)is compared with the focal length f_(1x) '. When f_(ox) ≦f_(1x) ', theprocess proceeds to step O-580, and when f_(ox) >f_(1x) ', the focallength f_(1x) ' is set to

    f.sub.1x '=f.sub.ox,

and the process proceeds to step O-580 (steps O-570 and O-575). At stepO-580, f_(1x) ' is compared with f_(2x) '. When f_(1x) '≦f_(2x) ', theprocess proceeds to step O-590, and when f_(1x) '>f_(2x) ', the focallength f_(2x) ' is set to f_(1xs) ', that is,

    f.sub.2x '=f.sub.1xs ', and

the process proceeds to step O-590 (steps O-580 and O-585). Then, atstep O-590, the focal length f_(1x) ' obtained as described above iswritten and stored in the E² PROM by using the subject distance DV₁ asan address, and at the next step O-595, the focal length f_(2x) ' iswritten and stored in the E² PROM by using the subject distance DV₁₊₁ asan address. Then, the process returns.

Next, a subroutine AE CALCULATION of Auto Depth Card will be describedwith reference to FIGS. 41A, 41B and 41C.

As already described, an object of Auto Depth Card is to take a picturewhere both a subject such as a person, etc. and the background are infocus. To achieve the object of the card, an aperture value having arange of depth of field from a present position of a subject to infinityis calculated by the following expression (9):

    F=Lp/(2·K.sub.EL ·α·δ)(9),

where:

Lp represents a present movement amount of the AF lens;

K_(EL) represents a converting coefficient for converting a defocusamount into a drive amount; and

α and δ represent constants with respect to a depth. At the aboveaperture value F, the depth of field covers a range up to infinity whenthe AF lens is moved by half of the present movement amount Lp from theinfinity position.

In the flow chart shown in FIG. 41A, the above aperture value F isobtained at step O-624, and an aperture value AVDEP shown by the APEXsystem (additive system of photographic exposure) is obtained from theaperture value F (step O-626). Then, the lens drive is controlled bycalculating a shift amount of the AF lens based on the aperture valueAVDEP so that the depth of field covers a range from infinity to apresent position of a subject. The control will be described later.

In the above expression (9), the movement amount Lp is 0 when a subjectis at infinity, and increases as the subject is closer to the camera.That is, when a subject is at infinity, it is not required to shift theAF lens since the depth of field is large, and the aperture value F isF=0. On the other hand, as a subject is closer, the AF lens has to belargely shifted in order to focus on the background as well as thesubject, so that the aperture value F increases. Actually, however,since there is a limit for a range of allowable aperture value, theaperture value AVDEP obtained as described above is set to AV_(o) whenit is smaller than the open aperture value Av_(o), and to AVmax when itis larger than the maximum aperture value AVmax (steps O-628 to O-634).

Then, at the next step O-636, a reference shutter speed TV_(F) for adetermination of camera shake is calculated by the following expressions(10) and (11):

    zFz=16×log.sub.a f.sub.p /50+56                      (10); and

    TV.sub.F =(zFz/2+16)/8                                     (11),

wherein f_(p) represents a focal length [mm] of a lens.

Since the longer the focal length is, the more liable a camera shake isto be caused, the reference shutter speed TV_(F) increases as the focallength increases in the above expressions (10) and (11).

When the reference shutter speed TV_(F) (a reference value for adetermination of camera shake) obtained as described above exceeds apredetermined value (that is TV_(F) >8), the reference shutter speedTV_(F) is set to 8 (steps O-640 and O-645). This is in order to preventa warning of camera shake from being made when the shutter speed exceedsa certain value.

Next, an exposure value EV_(s) is calculated from a photometry luminance(luminance of a main subject) BV_(s) (step O-650). Then, whether or notthe exposure value EV_(s) is within a control limit (that is, whether ornot it exceeds AVmax+TVmax, or whether or not it is smaller than AV_(o)+TVmin) is determined (steps O-655 and O-665). When the exposure valueEV_(s) is not within the control limit, the control limit is set as thecontrol shutter speed TV_(c) and the control aperture value AV_(c)(steps O-660 and O-670).

When the exposure EV_(s) is within the control limit, the controlaperture value AV, and the control shutter speed TV_(c) are calculatedbased on the AE program line shown in FIG. 42 at steps O-675 to O-740.

Firstly, a shutter speed is obtained from TV=EV_(s) -AV_(o) when anaperture value AV is AV=AV_(o), and whether or not the shutter speed TVis equal to or smaller than the reference value TV_(F) for adetermination of camera shake is determined (steps O-675 to O-680). WhenTV≦TV_(F), the control aperture value AV_(c) and the control shutterspeed TV_(c) are respectively set to

    AV.sub.c =AV.sub.o

and

    TV.sub.c =TV,

and the process proceeds to step O-745. When TV>TV_(F), the aperturevalue AV is set to

    AV=EV.sub.s -TV.sub.F,

and whether or not the aperture value AV is equal to or smaller than theabove-described aperture value AVDEP (an aperture value for making adepth of field cover a range from infinity to a present position of asubject) is determined (step O-695). When AV≦AVDEP, the control aperturevalue AV_(c) and the control shutter speed TV_(c) are respectively setto

    AV.sub.c =AV

and

    TV.sub.c =TV.sub.F,

in order to increase the depth of field by closing the aperture as muchas possible as well as to give a priority to that a camera shake is notcaused (step O-700), and the process proceeds to step O-745.

On the other hand, when AV>AVDEP, since only the same effect is obtainedeven if the aperture is closed by more than AVDEP, the aperture value AVis obtained based on a program line (shown in FIG. 42) for increasingthe aperture value AV and the shutter speed TV at the same rate (stepO-705). Then, whether or not the obtained aperture value AV is equal toor smaller than the maximum aperture value AVmax is determined (stepO-710). When AV>AVmax, the control aperture value AV_(c) and the controlshutter speed TV_(c) are respectively set to

    AV.sub.c =AVmax

and

    TV.sub.c =EV.sub.s -AVmax,

(step O-740), and the process proceeds to step O-745. On the other hand,when AV≦AVmax, the control aperture value AV_(c) is set to

    AV.sub.c =AV

and the shutter speed TV, to

    TV=EV.sub.s -AV,

and whether or not the shutter speed TV is equal to or smaller than themaximum shutter speed TVmax is determined (steps O-715 to O-725). WhenTV≦TVmax, the control shutter speed TV_(c) is set to

    TV.sub.c =TV,

and the process proceeds to step O-745. When TV>TVmax, the controlshutter speed TV_(c) is set to

    TV.sub.c =TVmax,

and the control aperture value AV_(c) is obtained again by

    AV.sub.c =EV.sub.s -TVmax

(steps O-725 to O-735). Then, the process proceeds to step O-745.

Based on the control aperture value AV_(c) and the control shutter speedTV_(c) obtained as described above, the in-body microcomputer μC1controls an exposure. In addition, the in-body microcomputer μC1controls the lens drive for shifting the AF lens so that the depth offield covers a range from infinity to a present position of a subject.

The control of the lens drive will be described with reference to FIG.43. In the figure, a mark X shows a position of a lens (or a position ofa main subject which becomes in focus when the lens is located at theposition), and a solid line having an arrow shows a range of a depth offield. As shown in the figure, when the control aperture value AV_(c) isequal to or smaller than the aperture value AVDEP, the lens is moved sothat a main subject is located at a front part of the depth of field,since the range of the depth of field is narrower and closer than thatof the depth of field corresponding to the aperture value AVDEP. At thistime, an in-focus condition is not obtained with respect to a rangeshown by a dotted line having an arrow. On the other hand, when thecontrol aperture value AV_(c) exceeds the aperture value AVDEP, therange of the depth of field is, as a whole, larger as well as closerthan that of the depth of field corresponding to the aperture valueAVDEP. For this reason, the lens is moved to a position which isdetermined according to the aperture value AVDEP (a position of the lenswhere the depth of field covers a range from infinity to a main subjectwhen an aperture value is the aperture value AVDEP). At this time, arange up to infinity is in focus.

Returning to the flow chart shown in FIG. 41C, the description will becontinued from step O-745. At steps from O-745, a calculation (APZcalculation) of the focal length f_(CD) corresponding to a subjectdistance is performed based on a zoom program line shown in FIG. 44.

Firstly, an integer portion DV₁ of the subject distance DV (distanceinformation shown in a logarithmic form) is taken out, a table in theROM is accessed by using the integer portion DV₁ as an address to readout a focal length f_(1x) (a logarithm), and a focal length f_(2x) (alogarithm) is similarly read out by using an integer DV₁₊₁ which islarger than the DV₁ by 1 as an address (steps O-745 to O-755).Subsequently, a decimal portion DV_(o) of the subject distance DV istaken out, and the focal length f_(CD) corresponding to the subjectdistance DV is obtained by

    f.sub.CD =f.sub.1x +(f.sub.2x -f.sub.1x)×DV.sub.o    (12)

(steps O-760 and O-765). At the next step O-770, whether or not thecamera is longitudinally held is determined. When the camera is notlongitudinally held, the process returns. When the camera islongitudinally held, after the focal length is increased by 1.3 times(since the focal length is shown in a logarithmic form, log1.3 is addedto the f_(CD)), the process returns (step O-775).

A result of the learning in the subroutine LEARNING is reflected on thevalues of the focal lengths f_(1x) and f_(2x) used for the calculationby the above expression (12) (see steps O-590 and O-595 of FIG. 39).Thus, the result of the learning is also reflected on the focal lengthf_(CD) obtained as described above. A change of the zoom program line(values of f_(1x) and f_(2x)) by learning is limited to the learningrange shown in FIG. 44.

Lastly, Portrait Card will be described.

Portrait Card is a card suitable for taking a picture of a person, suchas portraits, etc. When photographing is performed with this cardattached to the camera body, the camera is so controlled that a size ofa person is judged by a magnification to determine an appropriateaperture value, so that photographing is performed at a depth of fieldaccording to the size of the person. The operation of the card willhereinafter be described.

When Portrait Card is attached to the camera body, a routine RESET shownin FIG. 45 is executed, and when a signal whose level changes from lowto high is transmitted from the in-body microcomputer μC1 to theterminal CSCD of the card, a routine INTERRUPT shown in FIG. 46 isexecuted. The description of the routines RESET and INTERRUPT isomitted, since they are the same as the routines RESET (shown in FIG.35) and INTERRUPT (shown in FIG. 36) of Auto Depth Card, respectively.

A subroutine DATA SETTING shown in FIG. 47 is different from thesubroutine DATA SETTING (shown in FIG. 38) of Auto Depth Card only inthat at a determination whether or not the focal length and themagnification should be learned (see FIG. 48) in a subroutine LEARNING(shown in FIG. 49) called from the subroutine DATA SETTING, the range ofthe focal length f_(B) to be learned and that of the magnification β tobe learned are respectively

    35≦f.sub.B ≦300

and

    1/10≦β≦1/80.

As the other part of the subroutine DATA SETTING (shown in FIGS. 47 to49) is the same as that of Auto Depth Card (shown in FIGS. 37 to 39),the description thereof is omitted.

A subroutine AE CALCULATION will be described with reference to FIGS.50A, 50B and 50C.

When the subroutine is called, firstly, whether or not the focal lengthf_(p) (the present focal length inputted from the in-body microcomputerμC1 at step P-53 of FIG. 46) of the lens is equal to or longer than 50mm is determined at step P-624, and based on a result of thedetermination, the reference shutter speed TV_(H) for a determination ofcamera shake is obtained. That is, when f_(p) ≧50 mm, the referenceshutter speed TV_(H) is calculated by the following expressions (13) and(14) (step P-626):

    zFz=16×log.sub.a f.sub.p /50+56                      (13); and

    TV.sub.H =1.25×(zFz/2-56)16+5. 875                   (14),

where f_(p) represents a focal length of the lens. Since the longer afocal length is, the more liable a camera shake is to be caused even ata high shutter speed, in the above expressions, the longer a focallength is, the higher the reference shutter speed TV_(H) is. On theother hand, since a warning is made when a shutter speed is extremelylow even with a wide-angle lens, the reference shutter speed TV_(H) iscalculated by the following expressions when f_(P) <50 mm (step P-628):

    zFz=16×log.sub.a f.sub.p /50+56                      (15); and

    TV.sub.H =1.125×(zFz/2-56)/16+5. 875                 (16),

where f_(p) represents a focal length [mm] of the lens.

Then, whether or not the magnification β is smaller than 1/100 isdetermined at step P-630. When β≧1/100, an aperture value AVβ isobtained from the magnification β based on a program line shown in FIG.52, an aperture value AV_(x) is set to

    AV.sub.x =AVβ,

and the process proceeds to step P-670 (steps P-632 to P-634). Theprogram line shown in FIG. 52 is a program line for providing a relationbetween the magnification β and the aperture value AVβ. By using themagnification β as an address, the aperture value AVβ correspondingthereto is written and stored in the E² PROM, etc.

On the other hand, when β<1/100, since a main subject is taken in asmall size and, consequently, it is difficult to distinguish the mainsubject from the background, the aperture value AV_(x) is determinedaccording not to the magnification β but to the open aperture valueAV_(o) as follows (steps P-636 to P-665):

AV_(x) =3 when AV_(o) <3;

AV_(x) =AV_(o) when 3≦AV_(o) <3.5;

AV_(x) =4 when 3.5≦AV_(o) <4; and

AV_(x) =AV_(o) when 4≦AV_(o).

With such settings, in a lens having a small F number, the aperture israther closed to increase a depth of field so that the background isonly slightly out of focus.

The aperture value AV_(x) obtained as described above is the aperturevalue to be set in a photographing with Portrait Card. Actually,however, considering a control limit of an aperture value and shutterspeed and a camera shake, the control aperture value AV_(c) is obtainedalong with the control shutter speed TV_(c). A calculation of thecontrol shutter speed TV_(c) and the control aperture value AV_(c) willhereinafter be described.

Firstly, the exposure value EV, is obtained by

    EV.sub.x =BV.sub.x +SV

at step P-670, and whether or not the exposure value EV_(s) is within acontrol limit is determined (steps P-675 to P-685). When the exposurevalue EV_(s) is not within the control limit, the control shutter speedTV_(c) and the control aperture value AV_(c) is set to the controllimit. That is, when the exposure value EV_(s) is equal to or smallerthan the minimum control value AV_(o) +TVmin, the control aperture valueAV_(c) and the control shutter speed TV_(c) are respectively set to

    AV.sub.c =AV.sub.o

and

    TV.sub.c =TVmin

(step P-680), and when the exposure value EV_(s) exceeds the maximumcontrol value AVmax+TVmax, the above two are respectively set to

    AV.sub.c =AVmax

and

    TV.sub.c =TVmax

(step P-690).

On the other hand, when it is determined that the exposure value EV_(s)is within the control limit, a shutter speed TV=EV_(s) -AV_(o) at theopen aperture value AV_(o) is obtained, and whether or not the shutterspeed TV exceeds the reference shutter speed TV_(H) for a determinationof camera shake is determined (step P-700). When TV≦TV_(H), the controlaperture value AV_(c) and the control shutter speed TV_(c) arerespectively set to

    AV.sub.c =AV.sub.o

and

    TV.sub.c =TV

to increase the shutter speed as much as possible (step P-705).

On the other hand, when TV>TV_(H), an aperture value AV=EV_(s) -TV_(H)when a shutter speed is the reference value for a determination ofcamera shake is obtained, and whether or not the aperture value AV isequal to or larger than the aperture value AV_(x) obtained from theabove-described program line is determined (step P-715). When AV<AV_(x),the control aperture value AV_(c) and the control shutter speed TV_(c)are respectively set to

    AV.sub.c =AV

and

    TV.sub.c =TV.sub.H

(step P-720) so that the control aperture value AV_(c) approaches theaperture value AV_(x) as much as possible without a camera shake beingcaused. When AV≧AV_(x), a shutter speed TV=EV_(s) -AV_(x) at theaperture value AV_(x) is obtained, and whether or not the shutter speedTV is equal to or larger than the maximum shutter speed TVmax isdetermined (step P-725 and P-730). When TV<TVmax, the control aperturevalue AV_(c) and the control shutter speed TV_(c) are respectively setto

    AV.sub.c =AV.sub.x

and

    TV.sub.c =TV (step P-735).

When TV≧TVmax, the above two are respectively set to

    AV.sub.c =EV.sub.a -TV.sub.max

and

    TV.sub.c =TVmax

(step P-740).

After the control aperture value AV_(c) and the control shutter speedTV_(c) are determined as described above, a process of the APZcalculation from step P-745 is executed. The description thereof isomitted, since the process is the same as that (steps O-745 to O-775 ofFIG. 41C) of Auto Depth Card. The zoom program line for Portrait Card isshown by FIG. 51. In Portrait Card, similarly to in Auto Depth Card, thezoom program line can be changed by learning within the learning rangeshown in FIG. 51, and a result of the learning is reflected on the focallength f_(CD) obtained by the APZ calculation.

Finishing a description of the IC cards, a summary of this embodimentwill hereinafter be given.

As described above, according to this embodiment, a learning on zoomingis performed by the in-card microcomputer μC3 when the release switch S2is turned on (step S-470 of FIG. 29). For example, when Sports Card isbeing used, where a result of the learning is stored in the E² PROMprovided in the card as the difference Δf from the original zoom programline, the difference Δf is changed based on the change amount Δf_(x) ofa focal length due to a manual zooming when the release switch S2 isturned on (steps S-545 to S-555 of FIG. 32). The change amount Δf1 of afocal length is a difference f_(b) -f_(CD) (although it is actually aratio, it is represented as a difference since focal lengths are shownin a logarithmic form) between the actual focal length f_(B) (the latestfocal length in actual photographing) of the camera and the focal lengthf_(CD) obtained by the in-card microcomputer μC3, and the focal lengthf_(CD) is a focal length corresponding to the subject distance DVobtained by the in-body microcomputer μC1 (see step #1137 of FIG. 20)from the zoom program line (see steps S-830 to S-870 of FIG. 30B). Aresult of the learning is reflected, since the difference Δf obtained asdescribed above is used for calculation of a focal length by the in-cardmicrocomputer μC3 thereafter (step S-860 of FIG. 30B) so that the APZoperation is performed based on a program line which is made by shiftingthe original zoom program line as a whole by the difference Δ obtainedafter the learning.

As described above, when the learning mode is set to the ON mode,learning on zooming is performed (that is, the difference Δf ischanged). When the learning mode is set to the OFF mode by an operationof the learning mode switch S3 (steps S-460 to S-465 of FIG. 29),learning on zooming is not performed (that is, the difference Δf is notchanged) even if the release switch S2 is turned on (step S-500 of FIG.32). Moreover, a limitation is placed on a range of the learning onzooming, and the learning is stopped when the range of the learning isoutside a predetermined range.

However, a limitation is placed on a range of the above-describedlearning on zooming. That is, before the difference Δf is changed basedon the change amount Δf₁ of a focal length due to a manual operation,whether or not the actual focal length f_(B) (the latest focal length inphotographing) of a camera is within a predetermined range is determined(step S-530 of FIG. 32 and step 5-605 of FIG. 33). The difference Δf ischanged only when it is within the predetermined range (that is, flagLRF=0) (step 5-535 of FIG. 32). Thereby, when the difference (differencebetween f_(CD) and f_(B)) is too large, the photographing situation isdifferent from the photographing situation for Sports Card. Therefore,determining that it is not an object of this embodiment to change thezoom program line based on the large difference, learning is notperformed.

On the other hand, if the release switch 52 is turned on while thelearning mode is being set to the reset mode by an operation of thelearning mode switch 53 (steps S-460 to S-465 of FIG. 29), thedifference Δ stored in the E² PROM provided in the card is reset (Δf=0)to erase contents of the learning (steps S-505 to S-510 of FIG. 32). Inthis mode, the learning on zooming is not performed (that is, thedifference Δf is not changed), either, even if the release switch S2 isturned on. That is, the reset mode according to this embodiment can beconsidered to be a learning stopping mode including a reset operation ofcontents of learning.

As described above, according to this embodiment, by operating thelearning mode switch S3 at need, the learning function on zooming can bestopped or contents of the learning can be erased. Moreover, Sports Cardis provided with information on a range to be learned (that is, aprocedure for determining whether or not a range is within a learningrange). Based on the information, learning on zooming is automaticallystopped when a range is outside a predetermined learning range. That is,the mode is automatically changed between an automatic learning mode andan learning stopping mode according to the information provided toSports Card.

Further, when Auto Depth Card is being used, different from the casewhere Sports Card is used, a result of learning is reflected on the zoomprogram line itself. That is, data representing the zoom program lineare stored in the E² PROM provided in the card (that is, a focal lengthof every integral portion of an subject distance is stored), and whenthe release switch S2 is turned on (step O-470 of FIG. 37), the datarepresenting the zoom program line is changed based on a change amountL=f_(B) -f_(CD) of a focal length due to a manual zooming (see FIG. 40).At this time, the data stored in the E² PROM are re-written so that afocal length at the zoom program after the change is changed by Δf_(L)=L/n=(f_(B) -f_(CD))/n (steps O-545 to O-595 of FIG. 39), where nrepresents an integral number and the value thereof is experimentallydetermined. It is in order to prevent the zoom program line frombecoming unstable by being largely changed by learning that the valueΔf_(L) obtained by decreasing a change amount of a focal length L isused as described above. A result of the learning is reflected, sincethe zoom program line changed as described above is used for acalculation of the focal length f_(CD) by the in-card microcomputer μC3(steps O-745 to O-775) so that the APZ operation is performed based onthe changed zoom program line. The learning on zooming used by PortraitCard is the same as that of Auto Depth Card.

In the continuous advance mode where photographing is continuouslyperformed at predetermined intervals while the release switch S2 is ON,the subroutine LEARNING (shown in FIG. 32) is called at a photographingof the first frame in a single continuous photographing (steps S-480 toS-495, etc. of FIG. 29) to perform a learning on zooming (steps S-545 toS-555 of FIG. 32). However, the subroutine LEARNING is not called for aphotographing of the second and succeeding frames (steps S-485).Thereby, it is avoided that similar photographing scenes are repeatedlylearned, and only different photographing scenes are learned.

However, similar to the above-described case where Sports Card is used,a limitation is placed on a range of the learning on zooming in a casewhere Auto Depth Card or Portrait Card is used (see FIGS. 44 and 51).That is, before the zoom program line is changed based on the changeamount L=f_(B) -f_(CD) of a focal length due to a manual operation,whether or not the actual focal length f_(B) (the latest focal length inphotographing) of a camera and the magnification β are within apredetermined range is determined (steps O-530 of FIG. 39 and step P-530of FIG. 49, and steps O-605 to O-615 of FIG. 38 and steps P-605 to P-615of FIG. 48). The zoom program line is changed only when both of them arewithin the predetermined range (flag LRF=0) (step O-535 of FIG. 39 andstep P-535 of FIG. 49). Thereby, learning is not performed when it isconsidered that Auto Depth Card or Portrait Card is not suitable for thepresent photographing situation.

Moreover, according to this embodiment, in a case where Auto Depth Cardor Portrait Card is used, similarly to the case where Sports Card isused, learning on zooming can be stopped and contents of the learningcan be erased by operating the learning mode switch S3 at need. Asdescribed above, learning in this case corresponds to a change of datarepresenting a zoom program line stored in the E² PROM provided in thecard. The reset operation of contents of the learning corresponds toreturning the data representing a zoom program line stored in the E²PROM to data of the initial condition where no learning on zooming isperformed (steps O-505 to O-510 of FIG. 39 and steps P-505 to P-510 ofFIG. 49).

As well as the above-described function to stop learning or to erasecontents of the learning by an operation of the learning mode switch S3,Auto Depth Card and Portrait Card are provided, similarly to SportsCard, with a function to automatically change the mode between theautomatic learning mode and the learning stopping mode based oninformation provided to the cards. That is, Auto Depth Card and PortraitCard are provided with information on a range to be learned (a procedurefor determining whether or not a range is within a learning range)(FIGS. 38 and 48). Based on the information, the learning on zooming isautomatically stopped when a range outside is predetermined learningrange (flag LRF=1) (step O-535 of FIG. 39 and step P-535 of FIG. 49).Thereby, learning is not performed when it is considered that Auto DepthCard or Portrait Card is not suitable for the present photographingsituation.

Although the functions are allotted to the in-body microcomputer μC1 andthe in-card microcomputer μC3 in this embodiment, all the functions maybe allotted to the in-body microcomputer μC1. Moreover, although zoomprogram lines and data relating learning are stored in the E² PROMprovided in the card in this embodiment, they may be stored in a RAM orE² PROM provided in the camera body.

Although a single-lens reflex camera is described in the abovedescription of this embodiment, the automatic learning functiondescribed therein may be realized in cameras, such as a lens shuttercamera, where a finder optical system is separately provided. Further,the function may be realized not only in film cameras where film is usedas a taking medium but also in electronic still cameras where a CCD or aMOS-IC is used as a taking medium.

Obviously, many modifications and variations of the present inventionare possible in light of the above teachings. It is therefore to beunderstood that within the scope of the appended claims, the inventionmay be practiced other than as specifically described.

What is claimed is:
 1. A camera comprising:a taking lens whose focallength is variable; a memory in which data for finding a magnificationfrom a subject distance is previously stored; a structure which measuresa subject distance; an automatic zooming arrangement which determines afocal length of said taking lens based on a subject distance measured bysaid distance measuring structure and the data stored in said memory soas to vary the photographing magnification; a manual zooming arrangementwhich determines a focal length of said taking lens according to amanual operation; and a changing circuit which changes a content of thedata stored by said memory based on a focal length determined by saidmanual zooming arrangement and a subject distance measured by saiddistance measuring structure.
 2. A camera as claimed in claim 1, furthercomprising a change inhibiting circuit which inhibits an operation ofsaid changing circuit when a focal length determined by said manualzooming arrangement is outside a predetermined focal length range.
 3. Acamera as claimed in claim 1, further comprising a change inhibitingcircuit which inhibits an operation of said changing circuit when asubject distance measured by said distance measuring structure isoutside a predetermined distance range.
 4. A camera as claimed in claim1, further comprising a change inhibiting circuit which inhibits anoperation of said changing circuit when a magnification determined basedon a focal length determined by said manual zooming arrangement and asubject distance measured by said distance measuring structure isoutside a predetermined magnification range.
 5. A camera as claimed inclaim 1, further comprising a change inhibiting circuit which inhibitsan operation of said changing circuit when a focal length determined bysaid manual zooming arrangement is outside a focal length rangedetermined by a subject distance measured by said distance measuringstructure.
 6. A camera comprising:a memory where data showing a size ofa subject image is previously stored; a structure which measures asubject distance; an automatic image size setting arrangement whichvaries a size of a subject image based on a subject distance measured bysaid distance measuring structure and the data stored in said memory; amanual image size setting arrangement which determines a size of asubject image according to a manual operation; and a changing circuitwhich changes a content of the data stored in said memory based on asize of a subject image determined by said manual image size settingarrangement.
 7. A camera as claimed in claim 6, further comprising ataking lens whose focal length is variable, wherein said automatic imagesize setting arrangement and said manual image size setting arrangementare provided to determine a focal length of said taking lens.
 8. Acamera as claimed in claim 7, wherein said data showing a size of asubject image is a data showing a relation between a subject distanceand a focal length.
 9. A camera comprising:a memory where automaticcontrol data is stored; an automatic image size setting arrangementwhich determines an automatic control value based on said automaticcontrol data; a manual image size setting arrangement which determines amanual control value according to a manual operation; a changing circuitwhich changes the automatic control data stored in said memory accordingto said manual control value; and a change inhibiting circuit whichinhibits an operation of said changing circuit when said manual controlvalue does not fulfill a predetermined condition even if the manualcontrol value indicates a data to which the automatic control data canbe changed.
 10. A camera as claimed in claim 9, wherein said changeinhibiting circuit inhibits an operation of said changing circuit whensaid manual control value is outside a predetermined range.
 11. A cameraas claimed in claim 10, further comprising a taking lens whose focallength is variable and a structure which measures a subject distance,wherein a relation data showing a relation between a subject distanceand a focal length is previously stored in said memory, said automaticimage size setting arrangement determines a focal length of said takinglens based on a subject distance measured by said distance measuringstructure and the relation data stored in said memory, said manual imagesize setting arrangement determines a focal length of said taking lensaccording to a manual operation, and said changing circuit changes therelation data stored in said memory according to a focal lengthdetermined by said manual image size setting arrangement.
 12. A cameraas claimed in claim 11, wherein said change inhibiting circuit inhibitsan operation of said changing circuit when a focal length determined bysaid manual image size setting arrangement is outside a predeterminedfocal length range.
 13. A camera as claimed in claim 11, wherein saidchange inhibiting circuit inhibits an operation of said changing circuitwhen a subject distance measured by said distance measuring structure isoutside a predetermined distance range.
 14. A camera as claimed in claim11, wherein said change inhibiting circuit inhibits an operation of saidchanging circuit when a magnification determined based on a focal lengthdetermined by said manual image size setting arrangement and a subjectdistance measured by said distance measuring structure is outside apredetermined magnification range.
 15. A camera as claimed in claim 9,wherein said change inhibiting circuit inhibits an operation of saidchanging circuit when said manual control value is outside a rangedetermined according to said automatic control value.
 16. A camera asclaimed in claim 15, further comprising a taking lens whose focal lengthis variable and a structure which measures a subject distance, wherein adata showing relation between a subject distance and a focal length ispreviously stored in said memory, said automatic image size settingarrangement determines a focal length of said taking lens based on asubject distance measured by said distance measuring structure and thedata stored in said memory, and said manual image size settingarrangement determines a focal length of said taking lens according to amanual operation.
 17. A camera as claimed in claim 16, wherein saidchange inhibiting circuit inhibits an operation of said changing circuitwhen a focal length determined by said manual image size settingarrangement is outside a focal length range determined by a subjectdistance measured by said distance measuring structure.
 18. A camera asclaimed in claim 9, further comprising a selector which selects acondition among a plurality of conditions, wherein said changeinhibiting circuit inhibits an operation of said changing circuit whensaid manual control value does not fulfill a condition selected by saidselector.
 19. A camera as claimed in claim 18, further comprising:anexposure control value outputting circuit which outputs an exposurecontrol value; a calculator which calculates an aperture value and ashutter speed which correspond to said exposure control value based onone of plural program lines showing a correspondence relation between anexposure control value and a combination of an aperture value and ashutter speed; and a program line selector which selects a program lineamong said plural program lines, wherein said selector selects acondition corresponding to the program line selected by said programline selector.
 20. A camera comprising:a memory where an automaticcontrol data is stored; art automatic image size setting arrangementwhich determines an automatic control value based on said automaticcontrol data; a manual image size setting arrangement which determines amanual control value according to a manual operation; a selector whichselects an algorithm among plural algorithms; and a changing circuitwhich changes the automatic control data stored in said memory accordingto said manual control value based on the algorithm selected by saidselector.
 21. A camera as claimed in claim 20, further comprising:artexposure control value outputting circuit which outputs an exposurecontrol value; a calculator which calculates an aperture value and ashutter speed which correspond to said exposure control value based onone of plural program lines showing a correspondence relation between anexposure value and a combination of an aperture value and a shutterspeed; and a program line selector which selects a program line amongsaid plural program lines, wherein said selector selects an algorithmwhich corresponds to the program line selected by said program lineselector.
 22. A camera as claimed in claim 20, further comprising achange inhibiting circuit which inhibits an operation of said changingcircuit when said manual control value does not fulfill a predeterminedcondition, wherein said predetermined condition differs according toeach of said algorithms.
 23. A camera as claimed in claim 20, furthercomprising a detector which detects whether a taking image plane islonger in a vertical direction or in a horizontal direction, whereinsaid selector selects an algorithm according to an output of thedetector.
 24. A camera comprising:a taking lens whose focal length isvariable; a memory where a plurality of relations between a subjectdistance and a focal length are previously stored; a structure whichmeasures a subject distance; a selector which selects a relation amongsaid plurality of relations; art automatic zooming arrangement whichdetermines a focal length of said taking lens based on a subjectdistance measured by said distance measuring structure and the relationselected by said selector; art exposure control value outputting circuitwhich outputs an exposure control value; and a calculator whichcalculates an aperture value and a shutter speed which correspond tosaid exposure control value based on one of plural program lines showinga correspondence relation between an exposure control value and acombination of an aperture value and a shutter speed, wherein saidselector is provided to select a program line among said plural programlines.
 25. A camera as claimed in claim 24, further comprising:a manualzooming arrangement which determines a focal length of said taking lensaccording to a manual operation; and a changing circuit which changes acontent stored in said memory based on a focal length determined by saidmanual zooming arrangement and a subject distance measured by saiddistance measuring structure.
 26. A camera as claimed in claim 25,further comprising a change inhibiting circuit which inhibits anoperation of said changing circuit when a focal length determined bysaid manual zooming arrangement and/or a subject distance measured bysaid distance measuring structure do not fulfill a predeterminedcondition.
 27. A camera comprising:a memory for storing an automaticcontrol data; a determining circuit which determines an automaticcontrol value based on the stored automatic control data; a manualoperation member; a setting circuit which sets a manual control value,in response to the manual operation member; a carrying circuit whichcarries out an operation of the camera based on one of the determinedautomatic control value and the set manual control value; a detectorwhich detects a photographing condition; and a changing circuit whichchanges the automatic control data stored in the memory according toboth a detection result of the detector and the set manual controlvalue.